共用方式為


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>

會話組態選項。

適用於