Class SimpleAddress
Helps converting simple addresses to internal addresses.
Inheritance
Implements
Namespace: EPiServer.Web.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration(IncludeServiceAccessor = false)]
[ServiceConfiguration]
public class SimpleAddress : Object, ISimpleAddressResolver
Constructors
SimpleAddress(ServiceAccessor<IPageQuickSearch>, ISiteDefinitionResolver, IVirtualPathResolver, IContentLanguageAccessor, IContentLanguageSettingsHandler)
Initializes a new instance of the SimpleAddress class.
Declaration
public SimpleAddress(ServiceAccessor<IPageQuickSearch> pageQuickSearch, ISiteDefinitionResolver siteDefinitionResolver, IVirtualPathResolver virtualPathResolver, IContentLanguageAccessor contentLanguageAccessor, IContentLanguageSettingsHandler contentLanguageSettingsHandler)
Parameters
Type | Name | Description |
---|---|---|
ServiceAccessor<IPageQuickSearch> | pageQuickSearch | |
ISiteDefinitionResolver | siteDefinitionResolver | |
IVirtualPathResolver | virtualPathResolver | |
IContentLanguageAccessor | contentLanguageAccessor | |
IContentLanguageSettingsHandler | contentLanguageSettingsHandler |
Methods
Resolve(UrlBuilder, SimpleAddressResolveContext)
Tries to resolve a IContent instance from an URL interpreted as a simple address.
Declaration
public SimpleAddressResolveResult Resolve(UrlBuilder url, SimpleAddressResolveContext simpleAddressContext)
Parameters
Type | Name | Description |
---|---|---|
UrlBuilder | url | The url to resolve |
SimpleAddressResolveContext | simpleAddressContext | The current context |
Returns
Type | Description |
---|---|
SimpleAddressResolveResult | A resolved result if url could be resolved as a simple address for a content instance otherwise null |
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. |
TryResolveAsSimpleAddress(UrlBuilder, SimpleAddressResolveContext, out Object)
Tries to resolve url as a simple address.
Declaration
public virtual bool TryResolveAsSimpleAddress(UrlBuilder url, SimpleAddressResolveContext context, out object internalObject)
Parameters
Type | Name | Description |
---|---|---|
UrlBuilder | url | The URL. |
SimpleAddressResolveContext | context | The segment context. |
System.Object | internalObject | The internal object. |
Returns
Type | Description |
---|---|
System.Boolean | true if url match a simple adress else false |