Class ApplicationBuilderExtensions
Extension methods for the Microsoft.AspNetCore.Builder.IApplicationBuilder interface.
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.AspNetCore.Builder.IApplicationBuilder | app | The Microsoft.AspNetCore.Builder.IApplicationBuilder instance. |
System.Boolean | condition | if set to |
System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> | configurator | The delegate to invoke when |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | The Microsoft.AspNetCore.Builder.IApplicationBuilder instance. |
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.AspNetCore.Builder.IApplicationBuilder | app | The Microsoft.AspNetCore.Builder.IApplicationBuilder instance. |
System.Func<Microsoft.AspNetCore.Http.HttpContext, System.Boolean> | condition | The condition. |
System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> | configurator | The configuration. |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | The Microsoft.AspNetCore.Builder.IApplicationBuilder instance. |