Unosquare
    Show / Hide Table of Contents

    Class WebApiModuleExtensions

    Provides extension methods for WebApiModule.

    Inheritance
    Object
    WebApiModuleExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO.WebApi
    Syntax
    public static class WebApiModuleExtensions

    Methods

    WithController(WebApiModule, Type)

    Registers a controller type using a constructor.

    See RegisterControllerType(Type) for further information.

    Declaration
    public static WebApiModule WithController(this WebApiModule this, Type controllerType)
    Parameters
    Type Name Description
    WebApiModule this

    The WebApiModule on which this method is called.

    Type controllerType

    The type of the controller.

    Returns
    Type Description
    WebApiModule

    this with the controller type registered.

    See Also
    WithController(WebApiModule, Type, Func<WebApiController>)
    WithController<TController>(WebApiModule)
    RegisterControllerType(Type)

    WithController(WebApiModule, Type, Func<WebApiController>)

    Registers a controller type using a factory method.

    See RegisterControllerType(Type, Func<WebApiController>) for further information.

    Declaration
    public static WebApiModule WithController(this WebApiModule this, Type controllerType, Func<WebApiController> factory)
    Parameters
    Type Name Description
    WebApiModule this

    The WebApiModule on which this method is called.

    Type controllerType

    The type of the controller.

    Func<WebApiController> factory

    The factory method used to construct instances of controllerType.

    Returns
    Type Description
    WebApiModule

    this with the controller type registered.

    See Also
    WithController(WebApiModule, Type)
    WithController<TController>(WebApiModule, Func<TController>)
    RegisterControllerType(Type, Func<WebApiController>)

    WithController<TController>(WebApiModule)

    Registers a controller type using a constructor.

    See RegisterControllerType<TController>() for further information.

    Declaration
    public static WebApiModule WithController<TController>(this WebApiModule this)
        where TController : WebApiController, new()
    Parameters
    Type Name Description
    WebApiModule this

    The WebApiModule on which this method is called.

    Returns
    Type Description
    WebApiModule

    this with the controller type registered.

    Type Parameters
    Name Description
    TController

    The type of the controller.

    See Also
    WithController<TController>(WebApiModule, Func<TController>)
    WithController(WebApiModule, Type)
    RegisterControllerType<TController>()

    WithController<TController>(WebApiModule, Func<TController>)

    Registers a controller type using a factory method.

    See RegisterControllerType<TController>(Func<TController>) for further information.

    Declaration
    public static WebApiModule WithController<TController>(this WebApiModule this, Func<TController> factory)
        where TController : WebApiController
    Parameters
    Type Name Description
    WebApiModule this

    The WebApiModule on which this method is called.

    Func<TController> factory

    The factory method used to construct instances of TController.

    Returns
    Type Description
    WebApiModule

    this with the controller type registered.

    Type Parameters
    Name Description
    TController

    The type of the controller.

    See Also
    WithController<TController>(WebApiModule)
    WithController(WebApiModule, Type, Func<WebApiController>)
    RegisterControllerType<TController>(Func<TController>)

    Comments

    Back to top Copyright © 2017-2019 Unosquare