Class NullLanguageSelector

A language selector that will simply set selected language to the requested content language.

Inheritance
System.Object
NullLanguageSelector
Implements
System.Collections.Generic.IEnumerable<LoaderOption>
System.Collections.IEnumerable
System.Xml.Serialization.IXmlSerializable
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public class NullLanguageSelector : LanguageSelector, IEnumerable<LoaderOption>, IEnumerable, ILanguageSelectionSource, IXmlSerializable, ILanguageSelector
Remarks

No checks of any kind will be performed by this language selector imlpementation. If may very well indicate a language that does not exist for the current page.

The purpose of this selector implementation is to speed up the language selection process when retrieving pages without the need for proper language information. Typically when iterating thru the page tree and finding the parents of a page.

Constructors

NullLanguageSelector()

Declaration
public NullLanguageSelector()

Properties

Instance

Gets an instance of the NullLanguageSelector.

Declaration
public static LanguageSelector Instance { get; }
Property Value
Type Description
LanguageSelector

The instance.

Remarks

This class is immutable and to remove the need for creating multiple instances, simply reuse the instance returned by this property.

Methods

LoadLanguage(LanguageSelectorContext)

Selects language branch based on a page link only, used for example when loading versions or creating new pages

Declaration
[Obsolete("Simplify code in content providers to only use the Language property to get requested language (ILanguageSelector.Language). Removed usage of LanguageSelectorContext since fallback languages are now handled outside the provider.")]
public override void LoadLanguage(LanguageSelectorContext args)
Parameters
Type Name Description
LanguageSelectorContext args

Argument containg information about the actual page and language that should be loaded

Overrides

SelectPageLanguage(LanguageSelectorContext)

Selects which language branch of a page that should be loaded, used for examples in listings

Declaration
[Obsolete("Simplify code in content providers to only use the Language property to get requested language (ILanguageSelector.Language). Removed usage of LanguageSelectorContext since fallback languages are now handled outside the provider.")]
public override void SelectPageLanguage(LanguageSelectorContext args)
Parameters
Type Name Description
LanguageSelectorContext args

Argument containg information about the actual page and language that should be loaded

Overrides

SetInitializedLanguageBranch(LanguageSelectorContext)

The implemenentation must not call into GetPage. It should set SelectedLanguage property with the language branch that selector was initialized with.

Declaration
[Obsolete("Simplify code in content providers to only use the Language property to get requested language (ILanguageSelector.Language). Removed usage of LanguageSelectorContext since fallback languages are now handled outside the provider.")]
public override void SetInitializedLanguageBranch(LanguageSelectorContext args)
Parameters
Type Name Description
LanguageSelectorContext args
Overrides

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.Xml.Serialization.IXmlSerializable

Extension Methods