SessionMiddleware 构造函数

定义

创建一个新的 SessionMiddleware

public:
 SessionMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, Microsoft::AspNetCore::DataProtection::IDataProtectionProvider ^ dataProtectionProvider, Microsoft::AspNetCore::Session::ISessionStore ^ sessionStore, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Builder::SessionOptions ^> ^ options);
public SessionMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider, Microsoft.AspNetCore.Session.ISessionStore sessionStore, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.SessionOptions> options);
new Microsoft.AspNetCore.Session.SessionMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.AspNetCore.DataProtection.IDataProtectionProvider * Microsoft.AspNetCore.Session.ISessionStore * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.SessionOptions> -> Microsoft.AspNetCore.Session.SessionMiddleware
Public Sub New (next As RequestDelegate, loggerFactory As ILoggerFactory, dataProtectionProvider As IDataProtectionProvider, sessionStore As ISessionStore, options As IOptions(Of SessionOptions))

参数

next
RequestDelegate

表示 RequestDelegate 管道中的下一个中间件的 。

loggerFactory
ILoggerFactory

表示 ILoggerFactory 用于创建记录器实例的工厂的 。

dataProtectionProvider
IDataProtectionProvider

IDataProtectionProvider用于保护和验证 Cookie 的 。

sessionStore
ISessionStore

表示 ISessionStore 会话存储的 。

options
IOptions<SessionOptions>

会话配置选项。

适用于