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

Class PropertyDefinitionSynchronizer

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Handles synchronization of PropertyDefinition from model to database.

Inheritance
System.Object
PropertyDefinitionSynchronizer
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.DataAbstraction.RuntimeModel.Internal
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[ServiceConfiguration]
[ServiceConfiguration(typeof(IPropertyDefinitionTypeResolver))]
public class PropertyDefinitionSynchronizer : IPropertyDefinitionTypeResolver

Constructors

PropertyDefinitionSynchronizer()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the PropertyDefinitionSynchronizer class.

Declaration
public PropertyDefinitionSynchronizer()
Remarks

This constructor is available to make the class mockable in tests.

PropertyDefinitionSynchronizer(IPropertyDefinitionRepository, IPropertyDefinitionTypeRepository, ITabDefinitionRepository, IContentModelUsage, IBackingTypeResolver, MigrationStepRepository)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the PropertyDefinitionSynchronizer class.

Declaration
public PropertyDefinitionSynchronizer(IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, ITabDefinitionRepository tabDefinitionRepository, IContentModelUsage contentModelUsage, IBackingTypeResolver backingTypeResolver, MigrationStepRepository migrationStepRepository)
Parameters
Type Name Description
IPropertyDefinitionRepository propertyDefinitionRepository

The property definition repository.

IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository

The property definition type repository.

ITabDefinitionRepository tabDefinitionRepository

The tab definition repository.

IContentModelUsage contentModelUsage

The page model usage.

IBackingTypeResolver backingTypeResolver

Resolves the base type from a specified type.

MigrationStepRepository migrationStepRepository

The migration step repository.

Methods

CreatePropertyDefinition(PropertyDefinitionModel, Int32)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Creates a page definition from a model.

Declaration
public virtual void CreatePropertyDefinition(PropertyDefinitionModel model, int contentTypeID)
Parameters
Type Name Description
PropertyDefinitionModel model

The model.

System.Int32 contentTypeID

The page type ID.

Delete(PropertyDefinition)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deletes the specified page definition.

Declaration
public virtual void Delete(PropertyDefinition propertyDefinition)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The property definition.

ExistsPropertyDefinitionWithContentType(Guid)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Determines whether there is any property definition of the specified content type.

Declaration
public bool ExistsPropertyDefinitionWithContentType(Guid contentTypeID)
Parameters
Type Name Description
System.Guid contentTypeID

The content type ID.

Returns
Type Description
System.Boolean

true if there is a property definition of the specified type; otherwise, false.

Remarks

An example would be if there is a page type that has a property definition of a block with the specified id (contentTypeID)

GetPagesWithPropertyDefinition(PropertyDefinition)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets a list of all existing contents that uses the content definition.

Declaration
public virtual IList<ContentUsage> GetPagesWithPropertyDefinition(PropertyDefinition propertyDefinition)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The property definition.

Returns
Type Description
System.Collections.Generic.IList<ContentUsage>

A list of all content that uses the content definition.

IsPropertyDefinitionUsed(PropertyDefinition)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Checks if there is data stored for a property definition.

Declaration
public virtual bool IsPropertyDefinitionUsed(PropertyDefinition propertyDefinition)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The property definition.

Returns
Type Description
System.Boolean

true if there is data stored for definition otherwise false.

ResolveType(PropertyDefinitionModel)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Resolves the property definition type for the specified model.

Declaration
public virtual PropertyDefinitionType ResolveType(PropertyDefinitionModel model)
Parameters
Type Name Description
PropertyDefinitionModel model

The model to resolve.

Returns
Type Description
PropertyDefinitionType

UpdatePropertyDefinition(PropertyDefinitionModel)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Updates a property definition.

Declaration
public virtual void UpdatePropertyDefinition(PropertyDefinitionModel model)
Parameters
Type Name Description
PropertyDefinitionModel model

The property definition model to update to.

Implements

Extension Methods