CookiePolicyAppBuilderExtensions.UseCookiePolicy 方法

定义

重载

UseCookiePolicy(IApplicationBuilder)

CookiePolicyMiddleware 处理程序添加到指定的 IApplicationBuilder中,这将启用 Cookie 策略功能。

UseCookiePolicy(IApplicationBuilder, CookiePolicyOptions)

CookiePolicyMiddleware 处理程序添加到指定的 IApplicationBuilder中,这将启用 Cookie 策略功能。

UseCookiePolicy(IApplicationBuilder)

Source:
CookiePolicyAppBuilderExtensions.cs
Source:
CookiePolicyAppBuilderExtensions.cs
Source:
CookiePolicyAppBuilderExtensions.cs

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 向其添加处理程序的 。

返回

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

适用于

UseCookiePolicy(IApplicationBuilder, CookiePolicyOptions)

Source:
CookiePolicyAppBuilderExtensions.cs
Source:
CookiePolicyAppBuilderExtensions.cs
Source:
CookiePolicyAppBuilderExtensions.cs

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 ,它指定处理程序的选项。

返回

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

适用于