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

Class AvailableSettingsRepository

Default implementation of IAvailableSettingsRepository.

Inheritance
System.Object
AvailableSettingsRepository
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: 9.12.2
Syntax
[ServiceConfiguration(typeof(IAvailableSettingsRepository), Lifecycle = ServiceInstanceScope.Singleton)]
public class AvailableSettingsRepository : IAvailableSettingsRepository

Constructors

AvailableSettingsRepository(ServiceAccessor<IContentTypeRepository>, IAvailableModelSettingsRepository)

Initializes a new instance of the AvailableSettingsRepository class.

Declaration
public AvailableSettingsRepository(ServiceAccessor<IContentTypeRepository> contentTypeRepositoryAccessor, IAvailableModelSettingsRepository modelRepository)
Parameters
Type Name Description
ServiceAccessor<IContentTypeRepository> contentTypeRepositoryAccessor

The content type repository accessor.

IAvailableModelSettingsRepository modelRepository

The model repository.

Methods

ClearSetting(String)

Clears all settings defined for the content type.

Declaration
public void ClearSetting(string contentTypeName)
Parameters
Type Name Description
System.String contentTypeName

Name of the content type.

Remarks

Any other calls on the same session will be ignored if ClearAllSettings is called.

GetSetting(ContentType)

Gets the settings registered for the PageType in database.

Declaration
public AvailableSetting GetSetting(ContentType contentType)
Parameters
Type Name Description
ContentType contentType

Type of the page.

Returns
Type Description
AvailableSetting
Remarks

The runtime settings on ContentTypeAvailabilityService will be the merged result from settings specified on the content type and on the model.

ListSettings()

Lists the registered settings.

Declaration
public IDictionary<string, AvailableSetting> ListSettings()
Returns
Type Description
System.Collections.Generic.IDictionary<System.String, AvailableSetting>

RegisterSetting(ContentType, AvailableSetting)

Sets available content types settings for a page type.

Declaration
public void RegisterSetting(ContentType contentType, AvailableSetting setting)
Parameters
Type Name Description
ContentType contentType

Type of the page.

AvailableSetting setting

The setting.

Remarks

The runtime settings on ContentTypeAvailabilityService will be the merged result from settings specified on the content type and on the model.

Events

SettingsChanged

Occurs when a setting has been changed.

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

Implements

Extension Methods