Share via


UseForFeatureExtensions.UseMiddlewareForFeature<T> Method

Definition

Conditionally creates a branch in the request pipeline that is rejoined to the main pipeline.

public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMiddlewareForFeature<T> (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string featureName);
static member UseMiddlewareForFeature : Microsoft.AspNetCore.Builder.IApplicationBuilder * string -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseMiddlewareForFeature(Of T) (app As IApplicationBuilder, featureName As String) As IApplicationBuilder

Type Parameters

T

Parameters

featureName
String

Name of the feature that needs to be enabled to include the middleware in the application pipeline.

Returns

Applies to