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

Class PropertySettingsRepository

Acts as the link between the PropertySettingsContainer and data storage.

Inheritance
System.Object
PropertySettingsRepository
Namespace: EPiServer.Core.PropertySettings.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration]
public class PropertySettingsRepository : Object, IPropertySettingsRepository

Constructors

PropertySettingsRepository()

Initializes a new instance of the PropertySettingsRepository class.

Declaration
public PropertySettingsRepository()

PropertySettingsRepository(IEnumerable<PropertySettings>, DynamicDataStoreFactory, ISynchronizedObjectInstanceCache)

Initializes a new instance of the PropertySettingsRepository class.

Declaration
public PropertySettingsRepository(IEnumerable<PropertySettings> settingsByCode, DynamicDataStoreFactory dynamicDataStoreFactory, ISynchronizedObjectInstanceCache iSynchronizedObjectInstanceCache)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<PropertySettings> settingsByCode
DynamicDataStoreFactory dynamicDataStoreFactory
ISynchronizedObjectInstanceCache iSynchronizedObjectInstanceCache

Methods

Delete(PropertySettingsContainer)

Deletes the specified PropertySettingsContainer.

Declaration
public void Delete(PropertySettingsContainer propertySetting)
Parameters
Type Name Description
PropertySettingsContainer propertySetting

The PropertySettingsContainer to delete.

Delete(Guid)

Deletes the specified PropertySettingsContainer.

Declaration
public void Delete(Guid id)
Parameters
Type Name Description
System.Guid id

The System.Guid of the PropertySettingsContainer to delete.

DeleteGlobal(Guid)

Deletes the specified PropertySettingsWrapper.

Declaration
public void DeleteGlobal(Guid id)
Parameters
Type Name Description
System.Guid id

The id of the PropertySettingsWrapper to delete.

DeleteStore()

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public static void DeleteStore()

GetDefault(Type)

Gets the default PropertySettings.

Declaration
public PropertySettingsWrapper GetDefault(Type propertyType)
Parameters
Type Name Description
System.Type propertyType

Type of the property.

Returns
Type Description
PropertySettingsWrapper

true if successful.

GetGlobals(Type)

Gets a list of PropertySettings for a specified Type where IsGlobal is true.

Declaration
public IEnumerable<PropertySettingsWrapper> GetGlobals(Type propertyType)
Parameters
Type Name Description
System.Type propertyType

Type of the property.

Returns
Type Description
System.Collections.Generic.IEnumerable<PropertySettingsWrapper>

List of global settings for a type

OnPropertySettingSaved(PropertySettingsRepositoryEventArg)

Raises the PropertySettingSaved event.

Declaration
protected virtual void OnPropertySettingSaved(PropertySettingsRepositoryEventArg args)
Parameters
Type Name Description
PropertySettingsRepositoryEventArg args

The PropertySettingsRepositoryEventArg instance containing the event data.

Save(PropertySettingsContainer)

Saves the specified PropertySettingsContainer.

Declaration
public void Save(PropertySettingsContainer container)
Parameters
Type Name Description
PropertySettingsContainer container

The PropertySettingsContainer to save.

Save(PropertySettingsWrapper)

Saves the specified PropertySettingsWrapper.

Declaration
public void Save(PropertySettingsWrapper wrapper)
Parameters
Type Name Description
PropertySettingsWrapper wrapper

The PropertySettingsWrapper to save.

SaveGlobal(PropertySettingsWrapper)

Saves the global adding or replacing it in the globals collection.

Declaration
public void SaveGlobal(PropertySettingsWrapper global)
Parameters
Type Name Description
PropertySettingsWrapper global

The global settings instance to save.

SetDefault(Guid)

Sets which PropertySettings that is the default.

Declaration
public void SetDefault(Guid id)
Parameters
Type Name Description
System.Guid id

The id of the propertySetting.

TryGetContainer(Guid, out PropertySettingsContainer)

Tries to get a PropertySettingsContainer.

Declaration
public bool TryGetContainer(Guid id, out PropertySettingsContainer propertySettingsContainer)
Parameters
Type Name Description
System.Guid id

The id of the propertySettingsContainer.

PropertySettingsContainer propertySettingsContainer

The propertySetting to get.

Returns
Type Description
System.Boolean

true if successful.

TryGetWrapper(Guid, out PropertySettingsWrapper)

Tries to get a PropertySettingsWrapper.

Declaration
public bool TryGetWrapper(Guid id, out PropertySettingsWrapper propertySettingsWrapper)
Parameters
Type Name Description
System.Guid id

The id of the PropertySettingsWrapper.

PropertySettingsWrapper propertySettingsWrapper

The PropertySettingsWrapper to get.

Returns
Type Description
System.Boolean

true if successful.

Events

PropertySettingSaved

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

Declaration
public static event EventHandler<PropertySettingsRepositoryEventArg> PropertySettingSaved
Event Type
Type Description
System.EventHandler<PropertySettingsRepositoryEventArg>

Implements

Extension Methods