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

Class SiteConfigurationRepository

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Contains static access to global site configuration key values.

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

Constructors

SiteConfigurationRepository(ServiceAccessor<SiteConfigDB>)

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

Declaration
public SiteConfigurationRepository(ServiceAccessor<SiteConfigDB> dataAccess)
Parameters
Type Name Description
ServiceAccessor<SiteConfigDB> dataAccess

The data access.

Fields

UniqueIdKey

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Represents the key used to store a Unique ID for a site in the site configuration.

Declaration
public static readonly string UniqueIdKey
Field Value
Type Description
System.String

WebConfigKey

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Represents the key used to store Web.Config for a site in the site configuration.

Declaration
public static readonly string WebConfigKey
Field Value
Type Description
System.String

Methods

DeleteValue(String, String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deletes the configuration value associated with the provided site and key.

Declaration
public void DeleteValue(string siteId, string key)
Parameters
Type Name Description
System.String siteId

The id of the site that the value should be associated with.

System.String key

The key that the value should be associated with.

GetInstance()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets an instance of the currently configurated ISiteConfigurationRepository.

Declaration
public static ISiteConfigurationRepository GetInstance()
Returns
Type Description
ISiteConfigurationRepository

GetValue(String, String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the configuration value associated with the provided site and key.

Declaration
public string GetValue(string siteId, string key)
Parameters
Type Name Description
System.String siteId

The id of the site that the value is associated with.

System.String key

The key that the value is associated with.

Returns
Type Description
System.String

Configuration string if found; otherwise null.

GetValues(String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets a dictionary with all the configuration value associated with the provided key where the key of the returned dictionary is the site id.

Declaration
public IDictionary<string, string> GetValues(string key)
Parameters
Type Name Description
System.String key

The key that the value is associated with.

Returns
Type Description
System.Collections.Generic.IDictionary<System.String, System.String>

A dictionary with the site and configuration value.

SetValue(String, String, String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Sets the configuration value and associates it with the provided site and key.

Declaration
public void SetValue(string siteId, string key, string value)
Parameters
Type Name Description
System.String siteId

The id of the site that the value should be associated with.

System.String key

The key that the value should be associated with.

System.String value

The value that should be associated with the provided site and key.

Implements

Extension Methods