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

Class ContentLanguageSettingRepository

Repository for defined language setting per content in EPiServer similar to dynamic properties

Inheritance
System.Object
ContentLanguageSettingRepository
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: 10.10.4
Syntax
public abstract class ContentLanguageSettingRepository
Remarks

To find a language setting at runtime use IContentLanguageSettingsHandler instead since it has sophisticated support for caching and find the closest setting defined.

Constructors

ContentLanguageSettingRepository()

Declaration
protected ContentLanguageSettingRepository()

Methods

Delete(ContentReference, String)

Delete settings for the content and language branch

Declaration
public abstract void Delete(ContentReference contentLink, string language)
Parameters
Type Name Description
ContentReference contentLink
System.String language

List()

Load the complete language settings tree

Declaration
public abstract IEnumerable<ContentLanguageSetting> List()
Returns
Type Description
System.Collections.Generic.IEnumerable<ContentLanguageSetting>

A list of all language settings

Load(ContentReference)

Load all settings all languages on a content

Declaration
public abstract IEnumerable<ContentLanguageSetting> Load(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The page to load settings for

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

Returns array of PageLanguageSettings, empty array if no settings has been defined

Load(ContentReference, String)

Load settings for a content and language

Declaration
public abstract ContentLanguageSetting Load(ContentReference contentLink, string language)
Parameters
Type Name Description
ContentReference contentLink

The content link

System.String language

The language

Returns
Type Description
ContentLanguageSetting

The setting or null if no setting was found

OnDeleted(ContentLanguageSettingEventArgs)

Declaration
protected virtual void OnDeleted(ContentLanguageSettingEventArgs eventArgs)
Parameters
Type Name Description
ContentLanguageSettingEventArgs eventArgs

OnDeleting(ContentLanguageSettingCancellableEventArgs)

Declaration
protected virtual void OnDeleting(ContentLanguageSettingCancellableEventArgs eventArgs)
Parameters
Type Name Description
ContentLanguageSettingCancellableEventArgs eventArgs

OnSaved(ContentLanguageSettingEventArgs)

Declaration
protected virtual void OnSaved(ContentLanguageSettingEventArgs eventArgs)
Parameters
Type Name Description
ContentLanguageSettingEventArgs eventArgs

OnSaving(ContentLanguageSettingCancellableEventArgs)

Declaration
protected virtual void OnSaving(ContentLanguageSettingCancellableEventArgs eventArgs)
Parameters
Type Name Description
ContentLanguageSettingCancellableEventArgs eventArgs

Save(ContentLanguageSetting)

Save changes for the content and language branch

Declaration
public abstract void Save(ContentLanguageSetting setting)
Parameters
Type Name Description
ContentLanguageSetting setting

Events

ContentLanguageSettingDeleted

Trigged when content language setting have been deleted.

Declaration
public static event EventHandler<ContentLanguageSettingEventArgs> ContentLanguageSettingDeleted
Event Type
Type Description
System.EventHandler<ContentLanguageSettingEventArgs>

ContentLanguageSettingDeleting

Trigged when content language setting are about to be deleted.

Declaration
public static event EventHandler<ContentLanguageSettingCancellableEventArgs> ContentLanguageSettingDeleting
Event Type
Type Description
System.EventHandler<ContentLanguageSettingCancellableEventArgs>

ContentLanguageSettingSaved

Trigged when content language setting have been saved.

Declaration
public static event EventHandler<ContentLanguageSettingEventArgs> ContentLanguageSettingSaved
Event Type
Type Description
System.EventHandler<ContentLanguageSettingEventArgs>

ContentLanguageSettingSaving

Trigged when content language setting are about to be saved.

Declaration
public static event EventHandler<ContentLanguageSettingCancellableEventArgs> ContentLanguageSettingSaving
Event Type
Type Description
System.EventHandler<ContentLanguageSettingCancellableEventArgs>

Extension Methods