Click or drag to resize
ContextContainerTParent Class
Container class for storing ambient context data. The container is backed by both the HTTP context items (if available) and an AsyncLocalT field so that the data are available along the asynchronous control flow in a web application.
Inheritance Hierarchy
SystemObject
  CMS.BaseAbstractSimpleDataContainerTParent
    CMS.BaseAbstractDataContainerTParent
      CMS.BaseAbstractHierarchicalObjectTParent
        CMS.BaseContextContainerTParent
          CMS.BaseAbstractContextTContext

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 13.0.131
Syntax
C#
public class ContextContainer<TParent> : AbstractHierarchicalObject<TParent>
where TParent : new(), ContextContainer<TParent>

Type Parameters

TParent

The ContextContainerTParent type exposes the following members.

Constructors
Fields
  NameDescription
Protected fieldStatic memberAddToContainers
If true (default), the object is added to the thread containers so that it is cloned for a new thread
Top
Properties
  NameDescription
Public propertyColumnNames
Available column names.
(Inherited from AbstractDataContainerParentObjectType.)
Protected propertyStatic memberCurrent
Current request data
Public propertyIsDefault
Returns true if the context is the default request context
Public propertyItem
Gets the value of particular property
(Inherited from AbstractHierarchicalObjectTObject.)
Public propertyKey
Unique container key
Public propertyProperties
Properties available through the context.
(Inherited from AbstractHierarchicalObjectTObject.)
Protected propertyPropertyList
Used property list
(Inherited from AbstractHierarchicalObjectTObject.)
Protected propertyRegisteredColumns
Registered Columns
(Inherited from AbstractSimpleDataContainerTObject.)
Protected propertyRegisteredColumnsObject
Registered Columns object
(Inherited from AbstractSimpleDataContainerTObject.)
Protected propertyRegisteredProperties
Registered properties
(Inherited from AbstractHierarchicalObjectTObject.)
Protected propertyRegisteredPropertiesObject
Registered properties object
(Inherited from AbstractHierarchicalObjectTObject.)
Protected propertyUseLocalColumns
If true, the object uses local columns
(Inherited from AbstractSimpleDataContainerTObject.)
Protected propertyUseLocalProperties
If true, the object uses local properties
(Inherited from AbstractHierarchicalObjectTObject.)
Top
Methods
  NameDescription
Public methodStatic memberClear
Clears the current context value
Public methodClearCurrent
Clears the current context value
Public methodCombineWith
Combines current instance with other properties (modifies current instace!). List properties are merged from all the participating typeinfos, other properties are taken as first non-null value (non-null is determined by nullValues collection).
(Inherited from AbstractHierarchicalObjectTObject.)
Public methodContainsColumn
Returns true if specified column is available in current structure.
(Inherited from AbstractDataContainerParentObjectType.)
Public methodEnsureCurrent
Creates the internal ContextContainerTParent storage if it does not exist yet.
Protected methodStatic memberEnsureValueTValue
Ensures the value
Public methodGetProperty
Gets the context property.
(Inherited from AbstractHierarchicalObjectTObject.)
Protected methodGetPropertyType
Gets the type of the given property
(Inherited from AbstractHierarchicalObjectTObject.)
Public methodGetValue
Gets the object value.
(Inherited from AbstractSimpleDataContainerTObject.)
Public methodHasSetter
Returns true if given property has a setter
(Inherited from AbstractHierarchicalObjectTObject.)
Protected methodRegisterColumn(String, FuncTObject, Object)
Registers the given Column to the object
(Inherited from AbstractSimpleDataContainerTObject.)
Protected methodRegisterColumn(String, FuncTObject, Object, FuncTObject, Object, Object)
Registers the given Column to the object
(Inherited from AbstractSimpleDataContainerTObject.)
Protected methodRegisterColumns
Registers the Columns of this object
(Inherited from AbstractSimpleDataContainerTObject.)
Protected methodRegisterProperties
Registers the properties of this object
(Inherited from AbstractHierarchicalObjectTObject.)
Protected methodRegisterProperty(String, FuncTObject, Object)
Registers the given property to the object
(Inherited from AbstractHierarchicalObjectTObject.)
Protected methodRegisterProperty(String, Object, FuncTObject, Object, Object)
Registers the given parameterized property to the object.
(Inherited from AbstractHierarchicalObjectTObject.)
Public methodSetAsCurrent
Sets the current instance as the current thread item
Public methodSetProperty
Gets the context property.
(Inherited from AbstractHierarchicalObjectTObject.)
Public methodSetValue
Sets the object value.
(Inherited from AbstractSimpleDataContainerTObject.)
Public methodTryGetProperty(String, Object)
Gets the context property.
(Inherited from AbstractHierarchicalObjectTObject.)
Public methodTryGetProperty(String, Object, Boolean)
Returns value of property.
(Inherited from AbstractHierarchicalObjectTObject.)
Public methodTryGetValue
Returns value of column.
(Inherited from AbstractSimpleDataContainerTObject.)
Top
Remarks

To prevent the ambient context data from flowing along the asynchronous control flow or to child threads use the SuppressFlow method.

The CMSThread class prevents the ambient context data from implicitly flowing. Instead, the context data are explicitly cloned upon initializing the new thread.

See Also