November Happy Hour will be moved to Thursday December 5th.

Class ApplicationContext

Contains information about the current application context

Inheritance
System.Object
ApplicationContext
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce
Assembly: EPiServer.Business.Commerce.dll
Version: 12.17.2
Syntax
public class ApplicationContext : IApplicationContext

Constructors

ApplicationContext(ContentTypeModelRepository)

Declaration
public ApplicationContext(ContentTypeModelRepository contentTypeModelRepository)
Parameters
Type Name Description
EPiServer.DataAbstraction.ContentTypeModelRepository contentTypeModelRepository

Properties

DisableVersionSync

Gets the value of the DisableVersionSync appSetting, indicating whether an update to Catalog content done outside the Content APIs will remove any version data (e.g. drafts, old published versions...) for the affected Content. Setting this to true can improve the speed of batch operations done through the lower-level API:s (like ICatalogSystem), e.g. the catalog import.

Declaration
public virtual bool DisableVersionSync { get; }
Property Value
Type Description
System.Boolean

true to delete all versions; false to update versions if content models are available.

HasContentModelTypes

Indicates whether the current application has the IContent model types for catalog content available. Considers the models available if there is at least one available which is decorated with the CatalogContentTypeAttribute.

Declaration
public virtual bool HasContentModelTypes { get; }
Property Value
Type Description
System.Boolean

Instance

Declaration
public static ApplicationContext Instance { get; }
Property Value
Type Description
ApplicationContext

SkipContentModelCheck

Gets the episerver:SkipCatalogContentModelCheck appSetting, indicating wheter the value returned by HasContentModelTypes should be ignored. Setting this to true means operations that require the content models for catalog content are considered safe even if there are no classes decorated with CatalogContentTypeAttribute. This is useful for sites that don't use typed models.

Declaration
public virtual bool SkipContentModelCheck { get; }
Property Value
Type Description
System.Boolean
Remarks

The appSetting should under no circumstances be used in applications that share a database with an application which HAS content type models, e.g. in the Commerce Manager application.

Implements