SessionMiddlewareExtensions.UseSession 方法

定义

重载

UseSession(IApplicationBuilder)

添加 以 SessionMiddleware 自动为应用程序启用会话状态。

UseSession(IApplicationBuilder, SessionOptions)

添加 以 SessionMiddleware 自动为应用程序启用会话状态。

UseSession(IApplicationBuilder)

Source:
SessionMiddlewareExtensions.cs
Source:
SessionMiddlewareExtensions.cs
Source:
SessionMiddlewareExtensions.cs

添加 以 SessionMiddleware 自动为应用程序启用会话状态。

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

参数

返回

IApplicationBuilder

适用于

UseSession(IApplicationBuilder, SessionOptions)

Source:
SessionMiddlewareExtensions.cs
Source:
SessionMiddlewareExtensions.cs
Source:
SessionMiddlewareExtensions.cs

添加 以 SessionMiddleware 自动为应用程序启用会话状态。

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

参数

返回

IApplicationBuilder

适用于