Aracılığıyla paylaş


DistributedSessionStore.Create Yöntem

Tanım

Aşırı Yüklemeler

Create(String, TimeSpan, Func<Boolean>, Boolean)
Create(String, TimeSpan, TimeSpan, Func<Boolean>, Boolean)

Yeni bir oluşturun veya sürdürür ISession.

Create(String, TimeSpan, Func<Boolean>, Boolean)

public:
 virtual Microsoft::AspNetCore::Http::ISession ^ Create(System::String ^ sessionKey, TimeSpan idleTimeout, Func<bool> ^ tryEstablishSession, bool isNewSessionKey);
public Microsoft.AspNetCore.Http.ISession Create (string sessionKey, TimeSpan idleTimeout, Func<bool> tryEstablishSession, bool isNewSessionKey);
abstract member Create : string * TimeSpan * Func<bool> * bool -> Microsoft.AspNetCore.Http.ISession
override this.Create : string * TimeSpan * Func<bool> * bool -> Microsoft.AspNetCore.Http.ISession
Public Function Create (sessionKey As String, idleTimeout As TimeSpan, tryEstablishSession As Func(Of Boolean), isNewSessionKey As Boolean) As ISession

Parametreler

sessionKey
String
idleTimeout
TimeSpan
tryEstablishSession
Func<Boolean>
isNewSessionKey
Boolean

Döndürülenler

Uygulamalar

Şunlara uygulanır

Create(String, TimeSpan, TimeSpan, Func<Boolean>, Boolean)

Kaynak:
DistributedSessionStore.cs
Kaynak:
DistributedSessionStore.cs
Kaynak:
DistributedSessionStore.cs

Yeni bir oluşturun veya sürdürür ISession.

public:
 virtual Microsoft::AspNetCore::Http::ISession ^ Create(System::String ^ sessionKey, TimeSpan idleTimeout, TimeSpan ioTimeout, Func<bool> ^ tryEstablishSession, bool isNewSessionKey);
public Microsoft.AspNetCore.Http.ISession Create (string sessionKey, TimeSpan idleTimeout, TimeSpan ioTimeout, Func<bool> tryEstablishSession, bool isNewSessionKey);
abstract member Create : string * TimeSpan * TimeSpan * Func<bool> * bool -> Microsoft.AspNetCore.Http.ISession
override this.Create : string * TimeSpan * TimeSpan * Func<bool> * bool -> Microsoft.AspNetCore.Http.ISession
Public Function Create (sessionKey As String, idleTimeout As TimeSpan, ioTimeout As TimeSpan, tryEstablishSession As Func(Of Boolean), isNewSessionKey As Boolean) As ISession

Parametreler

sessionKey
String

Oturumu ararken kullanılan benzersiz bir anahtar.

idleTimeout
TimeSpan

Oturumun süresi dolmadan önce oturumun ne kadar süreyle devre dışı bırakılacağı (örn. erişilmemesi).

ioTimeout
TimeSpan

Maksimum süre LoadAsync(CancellationToken) ve CommitAsync(CancellationToken) izin verilen süre.

tryEstablishSession
Func<Boolean>

Oturumu değiştirmenin geçerli olduğunu doğrulamak için sırasında Set(String, Byte[]) çağrılan geri çağırma. Geri çağırma döndürürse false, Set(String, Byte[]) bir InvalidOperationExceptionoluşturmalıdır. SessionMiddleware , yanıt gönderilmeden önce oturum kurulmadıysa döndüren false bir geri arama sağlar.

isNewSessionKey
Boolean

true yeni oturum kuruyorsanız; false oturum devam ettiriyorsa.

Döndürülenler

Oluşturulan ISession veya sürdürülen.

Uygulamalar

Şunlara uygulanır