Class SimpleAddress
Helps converting simple addresses to internal addresses.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 9.12.2Syntax
[ServiceConfiguration]
[ServiceConfiguration(typeof(ISimpleAddressResolver))]
public class SimpleAddress : ISimpleAddressResolver
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 |
TryResolve(UrlBuilder, SegmentContext, out ContentReference)
Tries to resolve a IContent instance from an URL interpreted as a simple address
Declaration
public virtual bool TryResolve(UrlBuilder url, SegmentContext segmentContext, out ContentReference resolvedContentLink)
Parameters
Type | Name | Description |
---|---|---|
UrlBuilder | url | The url to resolve |
SegmentContext | segmentContext | The current context |
ContentReference | resolvedContentLink | A link to the resolved content or null if not resolved |
Returns
Type | Description |
---|---|
System.Boolean | true if url could be resolved as a simple address for a content instance |
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 |