Class LanguageSegmentMatcher

This interface supports the EPiServer infrastructure and is not intended to be used directly from your code.

Inheritance
System.Object
LanguageSegmentMatcher
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.Web.Routing.Segments
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
[ServiceConfiguration(typeof(ILanguageSegmentMatcher))]
public class LanguageSegmentMatcher : ILanguageSegmentMatcher

Constructors

LanguageSegmentMatcher(ILanguageBranchRepository, HostLanguageResolver)

Initializes a new instance of the LanguageSegmentMatcher class.

Declaration
public LanguageSegmentMatcher(ILanguageBranchRepository languageBranchRepository, HostLanguageResolver hostLanguageResolver)
Parameters
Type Name Description
ILanguageBranchRepository languageBranchRepository

The language branch repository.

HostLanguageResolver hostLanguageResolver

The host language resolver.

Methods

IsHostSpecificLanguage(String)

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Check if this language is specific to this host.

Declaration
[Obsolete("This method is no longer in use, use HostLanguageResolver.IsHostLanguageMatch instead.")]
public bool IsHostSpecificLanguage(string language)
Parameters
Type Name Description
System.String language

The language code to check

Returns
Type Description
System.Boolean

True if this language is specific to this host

TryGetLanguageId(String, out String)

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Tries to get a language id from an url segment.

Declaration
public virtual bool TryGetLanguageId(string urlSegment, out string languageId)
Parameters
Type Name Description
System.String urlSegment

The url segment to check

System.String languageId

The id of the langauge branch if it exists, otherwise null.

Returns
Type Description
System.Boolean

True if the language is enabled

TryGetLanguageUrlSegment(String, out String)

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Tries to get an url segment from a language id.

Declaration
public virtual bool TryGetLanguageUrlSegment(string languageId, out string urlSegment)
Parameters
Type Name Description
System.String languageId

The language id to check

System.String urlSegment

The url segment (with fallback to language ID) of the langauge branch if it exists, otherwise null.

Returns
Type Description
System.Boolean

True if the language is enabled

Implements

Extension Methods