Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class PropertyDefinitionTypeRepository

Repository for the PropertyDefinitionType data structure.

Inheritance
System.Object
PropertyDefinitionTypeRepository
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
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
[ServiceConfiguration(ServiceType = typeof(IPropertyDefinitionTypeRepository))]
public class PropertyDefinitionTypeRepository : IPropertyDefinitionTypeRepository

Constructors

PropertyDefinitionTypeRepository(ServiceAccessor<PropertyDefinitionTypeDB>, LocalizationService)

Initializes a new instance of the PropertyDefinitionTypeRepository class.

Declaration
public PropertyDefinitionTypeRepository(ServiceAccessor<PropertyDefinitionTypeDB> dataAccess, LocalizationService localizationService)
Parameters
Type Name Description
ServiceAccessor<PropertyDefinitionTypeDB> dataAccess

The data access accessor that should be used by the current instance.

LocalizationService localizationService

The localization service that should be used by the current instance.

Methods

ClearCache()

Clear all items from the cache.

Declaration
public static void ClearCache()

Delete(PropertyDefinitionType)

Deletes the suppied PropertyDefinitionType from the data repository.

Declaration
public virtual void Delete(PropertyDefinitionType propertyDefinitionType)
Parameters
Type Name Description
PropertyDefinitionType propertyDefinitionType

The PropertyDefinitionType that should be deleted.

Delete(Int32)

Deletes the PropertyDefinitionType with the supplied id from the data repository.

Declaration
public virtual void Delete(int id)
Parameters
Type Name Description
System.Int32 id

The PropertyDefinitionType id.

List()

Lists all PropertyDefinitionTypes in the data repository.

Declaration
public virtual IEnumerable<PropertyDefinitionType> List()
Returns
Type Description
System.Collections.Generic.IEnumerable<PropertyDefinitionType>

Enumeration of PropertyDefinitionTypes.

Load(Int32)

Loads a PropertyDefinitionType with the specified id from the data repository.

Declaration
public virtual PropertyDefinitionType Load(int id)
Parameters
Type Name Description
System.Int32 id

The PropertyDefinitionType id.

Returns
Type Description
PropertyDefinitionType

The PropertyDefinitionType that matches the given id or null if no match could be found.

Load(String, String)

Loads a PropertyDefinitionType with the specified System.Guid from the data repository.

Declaration
public virtual PropertyDefinitionType Load(string typeName, string assemblyName)
Parameters
Type Name Description
System.String typeName
System.String assemblyName
Returns
Type Description
PropertyDefinitionType

The PropertyDefinitionType that matches the given type and assembly or null if no match could be found.

Load(Type)

Loads a PropertyDefinitionType with the underlying System.Type from the data repository.

Declaration
public virtual PropertyDefinitionType Load(Type definitionType)
Parameters
Type Name Description
System.Type definitionType

The underlying System.Type of the PropertyDefinitionType.

Returns
Type Description
PropertyDefinitionType

The PropertyDefinitionType that matches the given System.Type or null if no match could be found.

LoadByBlockType(Guid)

Loads a BlockPropertyDefinitionType that corresponds to the BlockType with given id from the data repository.

Declaration
public BlockPropertyDefinitionType LoadByBlockType(Guid blockTypeId)
Parameters
Type Name Description
System.Guid blockTypeId

The block type id.

Returns
Type Description
BlockPropertyDefinitionType

The BlockPropertyDefinitionType that matches the given blockTypeId or null if no match could be found.

LoadByBlockType(Type)

Loads a BlockPropertyDefinitionType that corresponds to the BlockType with given model type from the data repository.

Declaration
public BlockPropertyDefinitionType LoadByBlockType(Type blockTypeModel)
Parameters
Type Name Description
System.Type blockTypeModel

The block type model.

Returns
Type Description
BlockPropertyDefinitionType

The BlockPropertyDefinitionType that matches the given blockTypeModel or null if no match could be found.

OnPropertyDefinitionTypeDeleted(RepositoryEventArgs)

Declaration
protected virtual void OnPropertyDefinitionTypeDeleted(RepositoryEventArgs args)
Parameters
Type Name Description
RepositoryEventArgs args

The RepositoryEventArgs instance containing the event data.

OnPropertyDefinitionTypeSaved(RepositoryEventArgs)

Raises the PropertyDefinitionTypeSaved event.

Declaration
protected virtual void OnPropertyDefinitionTypeSaved(RepositoryEventArgs args)
Parameters
Type Name Description
RepositoryEventArgs args

The RepositoryEventArgs instance containing the event data.

OnPropertyDefinitionTypeSaving(CancelPropertyDefinitionTypeEventArgs)

Raises the PropertyDefinitionTypeSaving event.

Declaration
protected virtual void OnPropertyDefinitionTypeSaving(CancelPropertyDefinitionTypeEventArgs args)
Parameters
Type Name Description
CancelPropertyDefinitionTypeEventArgs args

The CancelPropertyDefinitionTypeEventArgs instance containing the event data.

Save(PropertyDefinitionType)

Saves the specified PropertyDefinitionType to the data repository.

Declaration
public virtual void Save(PropertyDefinitionType propertyDefinitionType)
Parameters
Type Name Description
PropertyDefinitionType propertyDefinitionType

The PropertyDefinitionType that should be saved.

Events

PropertyDefinitionTypeDeleted

Occurs when a PropertyDefinitionType has been deleted.

Declaration
public static event EventHandler<RepositoryEventArgs> PropertyDefinitionTypeDeleted
Event Type
Type Description
System.EventHandler<RepositoryEventArgs>

PropertyDefinitionTypeSaved

Occurs when a PropertyDefinitionType has been saved, i.e. created or updated.

Declaration
public static event EventHandler<RepositoryEventArgs> PropertyDefinitionTypeSaved
Event Type
Type Description
System.EventHandler<RepositoryEventArgs>

PropertyDefinitionTypeSaving

Occurs when a PropertyDefinitionType is about to be saved.

Declaration
public static event EventHandler<CancelPropertyDefinitionTypeEventArgs> PropertyDefinitionTypeSaving
Event Type
Type Description
System.EventHandler<CancelPropertyDefinitionTypeEventArgs>

Implements

Extension Methods