Class SimpleAddress

Helps converting simple addresses to internal addresses.

Inheritance
System.Object
SimpleAddress
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
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public class SimpleAddress

Constructors

SimpleAddress(IContentRepository, ServiceAccessor<IPageQuickSearch>, TemplateResolver, HostLanguageResolver, SiteDefinitionResolver, SiteDefinitionRepository)

Initializes a new instance of the SimpleAddress class.

Declaration
public SimpleAddress(IContentRepository contentRepository, ServiceAccessor<IPageQuickSearch> pageQuickSearch, TemplateResolver templateResolver, HostLanguageResolver hostLanguageResolver, SiteDefinitionResolver siteDefinitionResolver, SiteDefinitionRepository siteDefintionRepository)
Parameters
Type Name Description
IContentRepository contentRepository

The content repository.

ServiceAccessor<IPageQuickSearch> pageQuickSearch

The page quick search.

TemplateResolver templateResolver

The template resolver.

HostLanguageResolver hostLanguageResolver

The host language resolver.

SiteDefinitionResolver siteDefinitionResolver

The site definition resolver.

SiteDefinitionRepository siteDefintionRepository

The site defintion repository.

Methods

SimpleAddressToInternal(UrlBuilder)

Converts an url from simple address to internal and return an object reference if the convertions was successful.

Declaration
public static object SimpleAddressToInternal(UrlBuilder url)
Parameters
Type Name Description
UrlBuilder url

The url to change.

Returns
Type Description
System.Object

Null if the url didn't match a simple address otherwise a page reference to the page.

SimpleAddressToInternal(UrlBuilder, ref Object)

Converts an url from simple address to internal.

Declaration
public static bool SimpleAddressToInternal(UrlBuilder url, ref object internalObject)
Parameters
Type Name Description
UrlBuilder url

The simple url to convert.

System.Object internalObject

The object reference to pass back.

Returns
Type Description
System.Boolean

True if the address was converted.

SimpleAddressToInternal(UrlBuilder, ref Object, IContentRepository, IPageQuickSearch, TemplateResolver, HostLanguageResolver, SiteDefinitionResolver, SiteDefinitionRepository)

Simples the address to internal.

Declaration
public static bool SimpleAddressToInternal(UrlBuilder url, ref object internalObject, IContentRepository contentRepository, IPageQuickSearch pageQuickSearch, TemplateResolver templateResolver, HostLanguageResolver hostLanguageResolver, SiteDefinitionResolver siteDefinitionResolver, SiteDefinitionRepository siteDefinitionRepository)
Parameters
Type Name Description
UrlBuilder url

The URL.

System.Object internalObject

The internal object.

IContentRepository contentRepository

The page repository.

IPageQuickSearch pageQuickSearch

The page quick search.

TemplateResolver templateResolver

The template resolver.

HostLanguageResolver hostLanguageResolver

The host language resolver.

SiteDefinitionResolver siteDefinitionResolver

The site definition resolver.

SiteDefinitionRepository siteDefinitionRepository

The site definition repository.

Returns
Type Description
System.Boolean

TryResolveAsSimpleAddress(UrlBuilder, SegmentContext, out Object)

Tries to resolve url as a simple address.

Declaration
public virtual bool TryResolveAsSimpleAddress(UrlBuilder url, SegmentContext segmentContext, out object internalObject)
Parameters
Type Name Description
UrlBuilder url

The URL.

SegmentContext segmentContext

The segment context.

System.Object internalObject

The internal object.

Returns
Type Description
System.Boolean

true if url match a simple adress else false

Extension Methods