Unosquare
    Show / Hide Table of Contents

    Class ActionModule

    A module that passes requests to a callback.

    Inheritance
    Object
    WebModuleBase
    ActionModule
    Implements
    IWebModuleImpl
    IWebModule
    Inherited Members
    WebModuleBase.Container
    WebModuleBase.IWebModuleImpl.SetContainer(IWebModuleContainer)
    WebModuleBase.BaseRoute
    WebModuleBase.OnUnhandledException
    WebModuleBase.OnHttpException
    WebModuleBase.LogSource
    WebModuleBase.Start(CancellationToken)
    WebModuleBase.MatchUrlPath(String)
    WebModuleBase.HandleRequestAsync(IHttpContext)
    WebModuleBase.OnStart(CancellationToken)
    WebModuleBase.SetContainer(IWebModuleContainer)
    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
    WebModuleBase(String)

    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
    WebModuleBase.IsFinalHandler
    Remarks

    If this property is true, a HTTP context's SetHandled() method will be automatically called immediately after after the returned by HandleRequestAsync(IHttpContext) is completed. This will prevent the context from being passed further along to other modules.

    See Also
    IsHandled
    SetHandled()

    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 representing the ongoing operation.

    Overrides
    WebModuleBase.OnRequestAsync(IHttpContext)

    Implements

    IWebModuleImpl
    IWebModule

    See Also

    WebModuleBase

    Comments

    Back to top Copyright © 2017-2019 Unosquare