Class DefaultUrlResolver
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. The default implementation of UrlResolver
Implements
Inherited Members
Namespace: EPiServer.Web.Routing.Internal
Assembly: EPiServer.dll
Version: 10.10.4Syntax
public class DefaultUrlResolver : UrlResolver, IUrlResolverConstructors
DefaultUrlResolver(RouteCollection, IContentLoader, ISiteDefinitionRepository, TemplateResolver, IPermanentLinkMapper, IContentLanguageSettingsHandler)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Creates a new instace of DefaultUrlResolver
Declaration
public DefaultUrlResolver(RouteCollection routes, IContentLoader contentLoader, ISiteDefinitionRepository siteDefinitionRepository, TemplateResolver templateResolver, IPermanentLinkMapper permanentLinkMapper, IContentLanguageSettingsHandler contentLanguageSettingsHandler)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Web.Routing.RouteCollection | routes | The registered routes to use. | 
| IContentLoader | contentLoader | The content loader to use | 
| ISiteDefinitionRepository | siteDefinitionRepository | The site definition repository to use | 
| TemplateResolver | templateResolver | The template resolver to use | 
| IPermanentLinkMapper | permanentLinkMapper | The permanent link mapper to use | 
| IContentLanguageSettingsHandler | contentLanguageSettingsHandler | The content language settings handler | 
Methods
ConvertToPermanent(UrlBuilder, IContent)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public virtual bool ConvertToPermanent(UrlBuilder url, IContent content)Parameters
| Type | Name | Description | 
|---|---|---|
| UrlBuilder | url | |
| IContent | content | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
GetUrl(UrlBuilder, VirtualPathArguments)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public override string GetUrl(UrlBuilder urlBuilderWithInternalUrl, VirtualPathArguments arguments)Parameters
| Type | Name | Description | 
|---|---|---|
| UrlBuilder | urlBuilderWithInternalUrl | The URL with a internal format. | 
| VirtualPathArguments | arguments | The VirtualPathArguments that determines the format of the link. | 
Returns
| Type | Description | 
|---|---|
| System.String | A URL in string representation. | 
Overrides
Remarks
    The returned url can be relative or absolute (including host) depending on if the urlBuilderWithInternalUrl is on current site
    and current request matches host that matches content and language. Overload GetVirtualPath can be used to always get relative virtual path.
GetVirtualPath(ContentReference, String, VirtualPathArguments)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public override VirtualPathData GetVirtualPath(ContentReference contentLink, string language, VirtualPathArguments arguments)Parameters
| Type | Name | Description | 
|---|---|---|
| ContentReference | contentLink | The content link. | 
| System.String | language | The language. | 
| VirtualPathArguments | arguments | 
Returns
| Type | Description | 
|---|---|
| System.Web.Routing.VirtualPathData | A virtual path or  | 
Overrides
Remarks
The returned value System.Web.Routing.VirtualPathData.VirtualPath is always a relative path (host and application is not included), call extension method GetUrl on VirtualPathData to get an absolute path (there is an overload that can be used if authority part should not be included).
GetVirtualPathForNonContent(Object, String, VirtualPathArguments)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public override VirtualPathData GetVirtualPathForNonContent(object partialRoutedObject, string language, VirtualPathArguments virtualPathArguments)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | partialRoutedObject | The partial routed object. | 
| System.String | language | The language. | 
| VirtualPathArguments | virtualPathArguments | The virtual path arguments. | 
Returns
| Type | Description | 
|---|---|
| System.Web.Routing.VirtualPathData | 
Overrides
Remarks
For virtual path to IContent, use the GetVirtualPath method with the content's ContentReference, which also handles cases where the content is partial routed.
The returned value System.Web.Routing.VirtualPathData.VirtualPath is always a relative path (host and application is not included), call extension method GetUrl on VirtualPathData to get an absolute path (there is an overload that can be used if authority part should not be included).
Route(UrlBuilder, ContextMode)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public override IContent Route(UrlBuilder urlBuilder, ContextMode contextMode)Parameters
| Type | Name | Description | 
|---|---|---|
| UrlBuilder | urlBuilder | The URL builder. | 
| ContextMode | contextMode | The ContextMode | 
Returns
| Type | Description | 
|---|---|
| IContent | 
Overrides
TryToPermanent(String, out String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public override bool TryToPermanent(string url, out string permanentUrl)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | url | The URL. | 
| System.String | permanentUrl | The permanent URL. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | True if the conversion succeded, otherwise; false. | 
