Class ActionModule
A module that passes requests to a callback.
Inherited Members
Namespace: EmbedIO.Actions
Syntax
public class ActionModule : WebModuleBase, IWebModuleImpl, IWebModule
Constructors
ActionModule(RequestHandlerCallback)
Initializes a new instance of the ActionModule class.
Declaration
public ActionModule(RequestHandlerCallback handler)
Parameters
Type | Name | Description |
---|---|---|
RequestHandlerCallback | handler | The handler. |
ActionModule(String, HttpVerb, RequestHandlerCallback)
Initializes a new instance of the ActionModule class.
Declaration
public ActionModule(string baseRoute, HttpVerb verb, RequestHandlerCallback handler)
Parameters
Type | Name | Description |
---|---|---|
String | baseRoute | The base route. |
HttpVerb | verb | The HTTP verb that will be served by this module. |
RequestHandlerCallback | handler | The callback used to handle requests. |
See Also
Properties
IsFinalHandler
Gets a value indicating whether processing of a request should stop after a module has handled it.
Declaration
public override bool IsFinalHandler { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Remarks
If this property is true, a HTTP context's
SetHandled() method will be automatically called
immediately after after the
See Also
Methods
OnRequestAsync(IHttpContext)
Called to handle a request from a client.
Declaration
protected override Task OnRequestAsync(IHttpContext context)
Parameters
Type | Name | Description |
---|---|---|
IHttpContext | context | The context of the request being handled. |
Returns
Type | Description |
---|---|
Task | A |