DistributedSession コンストラクター

定義

オーバーロード

DistributedSession(IDistributedCache, String, TimeSpan, Func<Boolean>, ILoggerFactory, Boolean)
DistributedSession(IDistributedCache, String, TimeSpan, TimeSpan, Func<Boolean>, ILoggerFactory, Boolean)

DistributedSession の新しいインスタンスを初期化します。

DistributedSession(IDistributedCache, String, TimeSpan, Func<Boolean>, ILoggerFactory, Boolean)

public:
 DistributedSession(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ sessionKey, TimeSpan idleTimeout, Func<bool> ^ tryEstablishSession, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, bool isNewSessionKey);
public DistributedSession (Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string sessionKey, TimeSpan idleTimeout, Func<bool> tryEstablishSession, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool isNewSessionKey);
new Microsoft.AspNetCore.Session.DistributedSession : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * TimeSpan * Func<bool> * Microsoft.Extensions.Logging.ILoggerFactory * bool -> Microsoft.AspNetCore.Session.DistributedSession
Public Sub New (cache As IDistributedCache, sessionKey As String, idleTimeout As TimeSpan, tryEstablishSession As Func(Of Boolean), loggerFactory As ILoggerFactory, isNewSessionKey As Boolean)

パラメーター

sessionKey
String
idleTimeout
TimeSpan
tryEstablishSession
Func<Boolean>
loggerFactory
ILoggerFactory
isNewSessionKey
Boolean

適用対象

DistributedSession(IDistributedCache, String, TimeSpan, TimeSpan, Func<Boolean>, ILoggerFactory, Boolean)

DistributedSession の新しいインスタンスを初期化します。

public:
 DistributedSession(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ sessionKey, TimeSpan idleTimeout, TimeSpan ioTimeout, Func<bool> ^ tryEstablishSession, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, bool isNewSessionKey);
public DistributedSession (Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string sessionKey, TimeSpan idleTimeout, TimeSpan ioTimeout, Func<bool> tryEstablishSession, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool isNewSessionKey);
new Microsoft.AspNetCore.Session.DistributedSession : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * TimeSpan * TimeSpan * Func<bool> * Microsoft.Extensions.Logging.ILoggerFactory * bool -> Microsoft.AspNetCore.Session.DistributedSession
Public Sub New (cache As IDistributedCache, sessionKey As String, idleTimeout As TimeSpan, ioTimeout As TimeSpan, tryEstablishSession As Func(Of Boolean), loggerFactory As ILoggerFactory, isNewSessionKey As Boolean)

パラメーター

cache
IDistributedCache

IDistributedCacheセッション データの格納に使用される 。

sessionKey
String

セッションの参照に使用される一意のキー。

idleTimeout
TimeSpan

セッションの有効期限が切れるまで、セッションが非アクティブになる (アクセスされないなど) 時間。

ioTimeout
TimeSpan

許容される最大時間とCommitAsync(CancellationToken)時間LoadAsync(CancellationToken)

tryEstablishSession
Func<Boolean>

セッションの変更が現在有効であることを確認するために、 の間に Set(String, Byte[]) 呼び出されるコールバック。 コールバックから が返された場合はfalseSet(String, Byte[])、 がスローされますInvalidOperationExceptionSessionMiddleware は、応答を送信する false 前にセッションが確立されなかった場合に を返すコールバックを提供します。

loggerFactory
ILoggerFactory

ILoggerFactory

isNewSessionKey
Boolean

true 新しいセッションを確立する場合。 false セッションを再開する場合は 。

適用対象