Class WebApiModuleExtensions
Provides extension methods for WebApiModule.
Inherited Members
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 |
|
See Also
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 |
Returns
Type | Description |
---|---|
WebApiModule |
|
See Also
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 |
|
Type Parameters
Name | Description |
---|---|
TController | The type of the controller. |
See Also
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 |
Returns
Type | Description |
---|---|
WebApiModule |
|
Type Parameters
Name | Description |
---|---|
TController | The type of the controller. |