Initializes a new HttpContext.Session item variable with a initializer
Namespace: DotNetNuke.Common.UtilitiesAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
C# |
---|
public SessionVariable( string key, Func<T> initializer ) |
Visual Basic |
---|
Public Sub New ( key As String, initializer As Func(Of T) ) |
Parameters
- key
- Type: System..::..String
The key to use for storing the value in the HttpContext.Current.Session
- initializer
- Type: System..::..Func<(Of <(<'T>)>)>
A function that is called in order to create a default value per HttpContext.Current.Session