Interface ISessionManager
Defines session management operations.
Namespace: Umbraco.Cms.Core.Web
Assembly: Umbraco.Core.dll
Syntax
public interface ISessionManager
Methods
View SourceClearSessionValue(string)
Clears the session value for the specified key.
Declaration
void ClearSessionValue(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The session key to clear. |
GetSessionValue(string)
Gets the session value for the specified key.
Declaration
string? GetSessionValue(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The session key. |
Returns
| Type | Description |
|---|---|
| string | The session value if found; otherwise, |
SetSessionValue(string, string)
Sets the session value for the specified key.
Declaration
void SetSessionValue(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The session key. |
| string | value | The value to store in the session. |