다음을 통해 공유


ISessionStore.Create 메서드

정의

오버로드

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

새 를 만들거나 를 다시 시작합니다 ISession.

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

public:
 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
Public Function Create (sessionKey As String, idleTimeout As TimeSpan, tryEstablishSession As Func(Of Boolean), isNewSessionKey As Boolean) As ISession

매개 변수

sessionKey
String
idleTimeout
TimeSpan
tryEstablishSession
Func<Boolean>
isNewSessionKey
Boolean

반환

적용 대상

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

Source:
ISessionStore.cs

새 를 만들거나 를 다시 시작합니다 ISession.

public:
 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
Public Function Create (sessionKey As String, idleTimeout As TimeSpan, ioTimeout As TimeSpan, tryEstablishSession As Func(Of Boolean), isNewSessionKey As Boolean) As ISession

매개 변수

sessionKey
String

세션을 조회하는 데 사용되는 고유 키입니다.

idleTimeout
TimeSpan

세션이 만료되기 전에 비활성(예: 액세스되지 않음)될 수 있는 기간입니다.

ioTimeout
TimeSpan

최대 시간 LoadAsync(CancellationToken)CommitAsync(CancellationToken) 소요가 허용됩니다.

tryEstablishSession
Func<Boolean>

세션 수정이 현재 유효한지 확인하기 위해 호출 Set(String, Byte[]) 된 콜백입니다. 콜백이 를 반환 false하는 경우 는 Set(String, Byte[])InvalidOperationExceptionthrow해야 합니다. SessionMiddleware 는 응답을 보내기 전에 세션이 설정되지 않은 경우 를 반환 false 하는 콜백을 제공합니다.

isNewSessionKey
Boolean

true 새 세션을 설정하는 경우 false 세션을 다시 시작하면 입니다.

반환

ISession 만들거나 다시 시작된 입니다.

적용 대상