ISession ISession ISession Interface

Definition

public interface ISession
type ISession = interface
Public Interface ISession
Derived

Properties

Id Id Id

A unique identifier for the current session. This is not the same as the session cookie since the cookie lifetime may not be the same as the session entry lifetime in the data store.

IsAvailable IsAvailable IsAvailable

Indicate whether the current session has loaded.

Keys Keys Keys

Enumerates all the keys, if any.

Methods

Clear() Clear() Clear()

Remove all entries from the current session, if any. The session cookie is not removed.

CommitAsync() CommitAsync() CommitAsync()

Store the session in the data store. This may throw if the data store is unavailable.

CommitAsync(CancellationToken) CommitAsync(CancellationToken) CommitAsync(CancellationToken)

Store the session in the data store. This may throw if the data store is unavailable.

LoadAsync() LoadAsync() LoadAsync()

Load the session from the data store. This may throw if the data store is unavailable.

LoadAsync(CancellationToken) LoadAsync(CancellationToken) LoadAsync(CancellationToken)

Load the session from the data store. This may throw if the data store is unavailable.

Remove(String) Remove(String) Remove(String)

Remove the given key from the session if present.

Set(String, Byte[]) Set(String, Byte[]) Set(String, Byte[])

Set the given key and value in the current session. This will throw if the session was not established prior to sending the response.

TryGetValue(String, Byte[]) TryGetValue(String, Byte[]) TryGetValue(String, Byte[])

Retrieve the value of the given key, if present.

Extension Methods

Get(ISession, String) Get(ISession, String) Get(ISession, String)
GetInt32(ISession, String) GetInt32(ISession, String) GetInt32(ISession, String)
GetString(ISession, String) GetString(ISession, String) GetString(ISession, String)
SetInt32(ISession, String, Int32) SetInt32(ISession, String, Int32) SetInt32(ISession, String, Int32)
SetString(ISession, String, String) SetString(ISession, String, String) SetString(ISession, String, String)

Applies to