Table of Contents

Class CMSStatic<TValue>

Namespace
CMS.Base
Assembly
CMS.Base.dll

Class for storing static data based on current connection context. Each connection context accesses its own data.

public class CMSStatic<TValue> : ICMSStatic

Type Parameters

TValue
Inheritance
object
CMSStatic<TValue>
Implements
Extension Methods

Constructors

CMSStatic()

Empty constructor

public CMSStatic()

CMSStatic(Func<TValue>)

Constructor

public CMSStatic(Func<TValue> initMethod)

Parameters

initMethod Func<TValue>

Initializing method for a new instance of the value

Properties

Value

Property value

public TValue Value { get; set; }

Property Value

TValue

Methods

GetDefaultValue()

Gets the default value for a new context

protected TValue GetDefaultValue()

Returns

TValue

Reset()

Resets the static field to its original state

public void Reset()

Operators

implicit operator TValue(CMSStatic<TValue>)

Implicit conversion from the property to its value

public static implicit operator TValue(CMSStatic<TValue> property)

Parameters

property CMSStatic<TValue>

Property to convert

Returns

TValue