• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class SessionVariable<T>

Wrapper class for .

Inheritance
System.Object
StateVariable<T>
SessionVariable<T>
Inherited Members
StateVariable<T>.HasValue
StateVariable<T>.ValueOrDefault
StateVariable<T>.Value
StateVariable<T>.Clear()
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 Source

SessionVariable(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.

| Improve this Doc View Source

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 Source

Item[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 Source

Remove(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)

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS