CookiePolicyAppBuilderExtensions.UseCookiePolicy 方法

定义

重载

UseCookiePolicy(IApplicationBuilder)

CookiePolicyMiddleware 处理程序添加到指定的 IApplicationBuilder ,后者启用 cookie 策略功能。

UseCookiePolicy(IApplicationBuilder, CookiePolicyOptions)

CookiePolicyMiddleware 处理程序添加到指定的 IApplicationBuilder ,后者启用 cookie 策略功能。

UseCookiePolicy(IApplicationBuilder)

CookiePolicyMiddleware 处理程序添加到指定的 IApplicationBuilder ,后者启用 cookie 策略功能。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCookiePolicy(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookiePolicy (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseCookiePolicy : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCookiePolicy (app As IApplicationBuilder) As IApplicationBuilder

参数

app
IApplicationBuilder

要向其 IApplicationBuilder 添加处理程序的。

返回

IApplicationBuilder

完成操作后对此实例的引用。

适用于

UseCookiePolicy(IApplicationBuilder, CookiePolicyOptions)

CookiePolicyMiddleware 处理程序添加到指定的 IApplicationBuilder ,后者启用 cookie 策略功能。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCookiePolicy(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::CookiePolicyOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookiePolicy (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.CookiePolicyOptions options);
static member UseCookiePolicy : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.CookiePolicyOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCookiePolicy (app As IApplicationBuilder, options As CookiePolicyOptions) As IApplicationBuilder

参数

app
IApplicationBuilder

要向其 IApplicationBuilder 添加处理程序的。

options
CookiePolicyOptions

一个 CookiePolicyOptions ,它指定处理程序的选项。

返回

IApplicationBuilder

完成操作后对此实例的引用。

适用于