Class ThreadRequiredContextAttribute
Indicates whether the marked class should be ensured before the new CMSThread is started to be available with current values within the CMSThread run.
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class ThreadRequiredContextAttribute : Attribute, IPreInitAttribute
- Inheritance
-
objectAttributeThreadRequiredContextAttribute
- Implements
- Extension Methods
Remarks
Marked class must implement CMS.Base.IContextContainer interface.
Constructors
ThreadRequiredContextAttribute(Type)
Creates new instance of ThreadRequiredContextAttribute.
public ThreadRequiredContextAttribute(Type markedType)
Parameters
markedType
TypeCMS.Base.IContextContainer context type.
Exceptions
- ArgumentNullException
Thrown when
markedType
is not set.- ArgumentException
Thrown when
markedType
is not implementing CMS.Base.IContextContainer.
Properties
MarkedType
Type of the context.
public Type MarkedType { get; }
Property Value
- Type
Remarks
Must implements CMS.Base.IContextContainer.
Methods
PreInit()
Registers context of MarkedType type.
public void PreInit()
Exceptions
- NullReferenceException
Thrown when MarkedType is not defined.