Class SessionVariable<T>
Wrapper class for
Inherited Members
Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke.dll
Syntax
public class SessionVariable<T> : StateVariable<T>
Type Parameters
Name | Description |
---|---|
T | The type of the value to be stored. |
Constructors
| Improve this Doc View SourceSessionVariable(String, Func<T>)
Initializes a new instance of the SessionVariable<T> class. Initializes a new HttpContext.Session item variable with a initializer.
Declaration
public SessionVariable(string key, Func<T> initializer)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to use for storing the value in the HttpContext.Current.Session. |
Func<T> | initializer | A function that is called in order to create a default value per HttpContext.Current.Session. |
SessionVariable(String)
Initializes a new instance of the SessionVariable<T> class. Initializes a new HttpContext.Session item variable.
Declaration
public SessionVariable(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to use for storing the value in the items. |
Properties
| Improve this Doc View SourceItem[String]
Get/sets the value in associated dictionary/map.
Declaration
protected override object this[string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Value key. |
Property Value
Type | Description |
---|---|
System.Object | The value. |
Overrides
DotNetNuke.Common.Utilities.StateVariable<T>.Item[System.String]
Methods
| Improve this Doc View SourceRemove(String)
Removes the value in associated dictionary according.
Declaration
protected override void Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Value key. |
Overrides
DotNetNuke.Common.Utilities.StateVariable<T>.Remove(System.String)