次の方法で共有


UseWhenExtensions.UseWhen メソッド

定義

メイン パイプラインに再参加するブランチを要求パイプラインに条件付きで作成します。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseWhen(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Func<Microsoft::AspNetCore::Http::HttpContext ^, bool> ^ predicate, Action<Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ configuration);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseWhen (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Func<Microsoft.AspNetCore.Http.HttpContext,bool> predicate, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> configuration);
static member UseWhen : Microsoft.AspNetCore.Builder.IApplicationBuilder * Func<Microsoft.AspNetCore.Http.HttpContext, bool> * Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseWhen (app As IApplicationBuilder, predicate As Func(Of HttpContext, Boolean), configuration As Action(Of IApplicationBuilder)) As IApplicationBuilder

パラメーター

predicate
Func<HttpContext,Boolean>

要求環境で呼び出され、分岐をたどるかどうかを決定します。

configuration
Action<IApplicationBuilder>

進む分岐を構成します。

戻り値

適用対象