CookiePolicyAppBuilderExtensions.UseCookiePolicy 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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
参数
要 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
参数
要 IApplicationBuilder 向其添加处理程序的 。
- options
- CookiePolicyOptions
一个 CookiePolicyOptions ,它指定处理程序的选项。
返回
完成操作后对此实例的引用。