Click or drag to resize
CMSActionContext Class
Ensures context for the actions block.
Inheritance Hierarchy
SystemObject
  CMS.BaseAbstractSimpleDataContainerCMSActionContext
    CMS.BaseAbstractDataContainerCMSActionContext
      CMS.BaseAbstractHierarchicalObjectCMSActionContext
        CMS.BaseContextContainerCMSActionContext
          CMS.BaseAbstractContextCMSActionContext
            CMS.BaseAbstractActionContextCMSActionContext
              CMS.BaseCMSActionContext

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 12.0.0
Syntax
C#
public sealed class CMSActionContext : AbstractActionContext<CMSActionContext>

The CMSActionContext type exposes the following members.

Constructors
  NameDescription
Public methodCMSActionContext
Constructor
Public methodCMSActionContext(IUserInfo)
Constructor. Ensures that all actions during the life of this object will use the given user context.
Top
Properties
  NameDescription
Public propertyAllowAsyncActions
Indicates if the actions can run asynchronously. Default is true, if the application is web site, otherwise false.
Public propertyAllowInitUser
Indicates if the current user should be initialized.
Public propertyAllowLicenseRedirect
Indicates whether a redirect is allowed in case the license check fails. If not, an exception is thrown instead.
Public propertyColumnNames
Available column names.
(Inherited from AbstractDataContainerParentObjectType.)
Public propertyContinuousIntegrationAllowObjectSerialization
Configures if object serialization within continuous integration is allowed in the given context
Public propertyCreateSearchTask
Indicates if the search task should be created for the objects.
Public propertyCreateVersion
Indicates if the object version should be created. In the context of Delete, false means the object will be destroyed, true means it will be in the recycle bin.
Public propertyStatic memberCurrentAllowAsyncActions
Indicates if the actions can run asynchronously. Default is true.
Public propertyStatic memberCurrentAllowInitUser
Indicates if the current user should be initialized.
Public propertyStatic memberCurrentAllowLicenseRedirect
Indicates whether a redirect is allowed in case the license check fails. If not, an exception is thrown instead.
Public propertyStatic memberCurrentCheckLicense
Indicates whether a license check should be performed when managing objects.
Public propertyStatic memberCurrentContinuousIntegrationAllowObjectSerialization
Indicates if object serialization within continuous integration is allowed in the given context
Public propertyStatic memberCurrentCreateSearchTask
Indicates if the search task should be created for the objects within the context.
Public propertyStatic memberCurrentCreateVersion
Indicates if the object version should be created.
Public propertyStatic memberCurrentDeletePhysicalFiles
Indicates whether a physical files should be deleted for attachments, meta files and media files.
Public propertyStatic memberCurrentDisconnected
Indicates if the objects within current context should behave as disconnected
Public propertyStatic memberCurrentEmptyDataForInvalidLicense
Indicates whether a get data queries for object that are not allowed under current license returns empty data set or throw an error.
Public propertyStatic memberCurrentEnableLogContext
Indicates whether logging through log context (LogContext) is currently enabled.
Public propertyStatic memberCurrentEnableSmartSearchIndexer
Indicates whether a search task should be executed when it is created.
Public propertyStatic memberCurrentIsLiveSite
Indicates whether the currently running code executes on the live site.
Public propertyStatic memberCurrentLogEvents
Indicates if the events should be logged within the context.
Public propertyStatic memberCurrentLogExport
Indicates if the export tasks should be logged within the context.
Public propertyStatic memberCurrentLogIntegration
Indicates if the integration tasks should be logged within the context.
Public propertyStatic memberCurrentLogLicenseWarnings
Indicates whether a warning is logged when license check for feature availability fails.
Public propertyStatic memberCurrentLogSynchronization
Indicates if the staging tasks should be logged within the context.
Public propertyStatic memberCurrentLogWebFarmTasks
Indicates if the web farm tasks should be logged within the context.
Public propertyStatic memberCurrentResetChanges
Indicates whether the changes made to the object instance should be reseted.
Public propertyStatic memberCurrentSendEmails
Indicates if the emails should be sent.
Public propertyStatic memberCurrentSendNotifications
Indicates if the notifications should be sent.
Public propertyStatic memberCurrentSite
Current site of the context.
Public propertyStatic memberCurrentThreadGuid
Guid of the current CMSTread. Empty guid when execution is not running under CMSThread.
Public propertyStatic memberCurrentTouchCacheDependencies
Indicates if the objects cache dependencies should be touched within the context.
Public propertyStatic memberCurrentTouchParent
Indicates if the objects within current context should touch parent object
Public propertyStatic memberCurrentUpdateRating
Indicates whether a rating should be updated.
Public propertyStatic memberCurrentUpdateSystemFields
Indicates if the system fields should be updated.
Public propertyStatic memberCurrentUpdateTimeStamp
Indicates if the objects time stamps should be updated within the context.
Public propertyStatic memberCurrentUpdateUserCounts
Indicates whether a user activity points should be updated.
Public propertyStatic memberCurrentUseCacheForSynchronizationXMLs
Indicates if XMLs in synchronization module should be cached/obtained from cache.
Public propertyStatic memberCurrentUseGlobalAdminContext
Indicates if global admin context should be used.
Public propertyStatic memberCurrentUser
Current user of the context.
Public propertyDeletePhysicalFiles
Indicates whether a physical files should be deleted for attachments, meta files and media files.
Public propertyDisconnected
Indicates if the objects within current context should behave as disconnected
Public propertyEmptyDataForInvalidLicense
Indicates whether a get data queries for object that are not allowed under current license returns empty data set or throw an error.
Public propertyEnableLogContext
Indicates whether logging through log context (LogContext) is currently enabled.
Public propertyEnableSmartSearchIndexer
Indicates whether a search task should be executed when it is created.
Public propertyIsDefault
Returns true if the context is the default request context
(Inherited from ContextContainerTParent.)
Public propertyIsLiveSite
Indicates whether the currently running code executes on the live site.
Public propertyItem
Gets the value of particular property
(Inherited from AbstractHierarchicalObjectTObject.)
Public propertyKey
Unique container key
(Inherited from ContextContainerTParent.)
Public propertyLogEvents
Indicates if the events should be logged.
Public propertyLogExport
Indicates if the export tasks should be logged.
Public propertyLogIntegration
Indicates if the integration tasks should be logged.
Public propertyLogLicenseWarnings
Indicates whether a warning is logged when license check for feature availability fails.
Public propertyLogSynchronization
Indicates if the staging tasks should be logged.
Public propertyLogWebFarmTasks
Indicates if the web farm tasks should be logged.
Protected propertyOriginalData
Previous context data
(Inherited from AbstractActionContextTContext.)
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.)
Public propertyResetChanges
Indicates whether the changes made to the object instance should be reseted.
Public propertyRestoreOriginal
If true, the original values are restored in the context
(Inherited from AbstractActionContextTContext.)
Public propertySendEmails
Indicates if email should be sent.
Public propertySendNotifications
Indicates if the notifications should be sent.
Public propertyThreadCulture
Current thread culture.
Public propertyThreadGuid
Guid of the current CMSTread. Guid.Empty when execution is not running under CMSThread.
Public propertyTouchCacheDependencies
Indicates if the objects cache dependencies should be touched.
Public propertyTouchParent
Indicates if the objects within current context should touch parent object
Public propertyUpdateRating
Indicates whether a user activity points should be updated.
Public propertyUpdateSystemFields
Indicates if the system fields should be updated.
Public propertyUpdateTimeStamp
Indicates if the objects time stamps should be updated.
Public propertyUpdateUserCounts
Indicates whether a user activity points should be updated.
Public propertyUseCacheForSynchronizationXMLs
Indicates if XMLs in synchronization module should be cached/obtained from cache.
Public propertyUseGlobalAdminContext
Indicates if global admin context should be used.
Protected propertyUseLocalColumns
If true, the object uses local columns
(Inherited from AbstractSimpleDataContainerTObject.)
Protected propertyUseLocalProperties
If true, the object uses local properties
(Inherited from AbstractHierarchicalObjectTObject.)
Public propertyUser
User of the context.
Top
Methods
  NameDescription
Public methodClearCurrent
Clears the current context value
(Inherited from ContextContainerTParent.)
Public methodCloneForNewThread
Clones the object for the new thread
(Overrides AbstractContextTContextCloneForNewThread.)
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 methodDisableAll
Disables all automated actions except for the ones necessary to keep the system consistent Disables: Logging for synchronization, event log, web farm tasks, versioning and cache dependencies Timestamp update Object invalidation Cache usage Asynchronous actions Sending of emails Smart search indexing Updating ratings Does not disable: Object serialization
Public methodDisableLogging
Disables logging of event log, staging and export tasks
Public methodDispose
Disposes the object.
(Inherited from AbstractActionContextTContext.)
Public methodEnsureCurrent (Inherited from ContextContainerTParent.)
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.)
Public methodStatic memberLogDocumentChange
Indicates if the document change should be logged.
Public methodStatic memberLogObjectChange
Indicates if the object change should be logged.
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.)
Protected methodRestoreOriginalValues
Restores the original values to the context
(Overrides AbstractActionContextTContextRestoreOriginalValues.)
Public methodSetAsCurrent
Sets the current instance as the current thread item
(Inherited from ContextContainerTParent.)
Public methodSetProperty
Gets the context property.
(Inherited from AbstractHierarchicalObjectTObject.)
Public methodSetValue
Sets the object value.
(Inherited from AbstractSimpleDataContainerTObject.)
Protected methodStoreOriginalValueTValue(NullableTValue, TValue)
Stores current value as the original value if original value hasn't been stored yet.
(Inherited from AbstractActionContextTContext.)
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
Examples
using(var ctx = new CMSActionContext() { LogEvents = false }) { DoSomeAction(); }
See Also