Class ApplicationBuilderExtensions
Extension methods for the Microsoft.
Inheritance
System.Object
ApplicationBuilderExtensions
Namespace: Cuemon.AspNetCore.Mvc
Assembly: Cuemon.AspNetCore.Mvc.dll
Syntax
public static class ApplicationBuilderExtensions
Methods
| Improve this DocUseWhen(IApplicationBuilder, Boolean, Action<IApplicationBuilder>)
Conditionally creates a branch in the request pipeline that is rejoined to the main pipeline.
Declaration
public static IApplicationBuilder UseWhen(this IApplicationBuilder app, bool condition, Action<IApplicationBuilder> configurator)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
app | The Microsoft. |
System. |
condition | if set to |
System. |
configurator | The delegate to invoke when |
Returns
Type | Description |
---|---|
Microsoft. |
The Microsoft. |
UseWhen(IApplicationBuilder, Func<HttpContext, Boolean>, Action<IApplicationBuilder>)
Conditionally creates a branch in the request pipeline that is rejoined to the main pipeline.
Declaration
public static IApplicationBuilder UseWhen(this IApplicationBuilder app, Func<HttpContext, bool> condition, Action<IApplicationBuilder> configurator)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
app | The Microsoft. |
System. |
condition | The condition. |
System. |
configurator | The configuration. |
Returns
Type | Description |
---|---|
Microsoft. |
The Microsoft. |