Class PropertyDefinitionTypeRepository
Repository for the PropertyDefinitionType data structure.
Inheritance
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration(ServiceType = null)]
public class PropertyDefinitionTypeRepository : Object, IPropertyDefinitionTypeRepository, ICachedRepository
Constructors
PropertyDefinitionTypeRepository(ServiceAccessor<PropertyDefinitionTypeDB>, LocalizationService, ISynchronizedObjectInstanceCache, DefaultPropertyDefinitionTypeEvents)
Initializes a new instance of the PropertyDefinitionTypeRepository class.
Declaration
public PropertyDefinitionTypeRepository(ServiceAccessor<PropertyDefinitionTypeDB> dataAccess, LocalizationService localizationService, ISynchronizedObjectInstanceCache cacheInstance, DefaultPropertyDefinitionTypeEvents propertyDefinitionTypeEvents)
Parameters
Type | Name | Description |
---|---|---|
ServiceAccessor<PropertyDefinitionTypeDB> | dataAccess | |
LocalizationService | localizationService | |
ISynchronizedObjectInstanceCache | cacheInstance | |
DefaultPropertyDefinitionTypeEvents | propertyDefinitionTypeEvents |
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 |
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 |
OnPropertyDefinitionTypeDeleted(PropertyDefinitionTypeEventArgs)
Raises the Deleted event.
Declaration
protected virtual void OnPropertyDefinitionTypeDeleted(PropertyDefinitionTypeEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinitionTypeEventArgs | args | The PropertyDefinitionTypeEventArgs instance containing the event data. |
OnPropertyDefinitionTypeSaved(PropertyDefinitionTypeEventArgs)
Raises the Saved event.
Declaration
protected virtual void OnPropertyDefinitionTypeSaved(PropertyDefinitionTypeEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinitionTypeEventArgs | args | The PropertyDefinitionTypeEventArgs 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> |
Explicit Interface Implementations
ICachedRepository.ClearCache()
Clear all items from the cache.
Declaration
void ICachedRepository.ClearCache()