Class NullLanguageSelector
A language selector that will simply set selected language to the requested content language.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class NullLanguageSelector : 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 ILanguageSelector Instance { get; }
Property Value
Type | Description |
---|---|
ILanguageSelector | 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
public void LoadLanguage(LanguageSelectorContext args)
Parameters
Type | Name | Description |
---|---|---|
LanguageSelectorContext | args | Argument containg information about the actual page and language that should be loaded |
SelectPageLanguage(LanguageSelectorContext)
Selects which language branch of a page that should be loaded, used for examples in listings
Declaration
public void SelectPageLanguage(LanguageSelectorContext args)
Parameters
Type | Name | Description |
---|---|---|
LanguageSelectorContext | args | Argument containg information about the actual page and language that should be loaded |
SetInitializedLanguageBranch(LanguageSelectorContext)
The implemenentation must not call into GetPage. It should set SelectedLanguage property with the language branch that selector was initialized with.
Declaration
public void SetInitializedLanguageBranch(LanguageSelectorContext args)
Parameters
Type | Name | Description |
---|---|---|
LanguageSelectorContext | args |