C# Класс Rebel.Cms.Web.Routing.DefaultRoutingEngine

A utility for resolving urls and looking up entities by URL
Наследование: IRoutingEngine
Показать файл Открыть проект

Открытые методы

Метод Описание
ClearCache ( bool clearDomains = false, HiveId clearForIds = null, bool clearMappedUrls = false, bool clearGeneratedUrls = false, bool clearAll = false ) : void

Clears the cache, removes domain cache items and content-url items

DefaultRoutingEngine ( IRebelApplicationContext appContext, System.Web.HttpContextBase httpContext ) : System

Initializes a new instance of the DefaultRoutingEngine class.

FindEntityByUrl ( Uri fullUrlIncludingDomain, RevisionStatusType revisionStatusType = null ) : EntityRouteResult

Finds a TypedEntity based on the Uri

GetAllUrlsForEntity ( TypedEntity entity ) : Rebel.Cms.Web.Routing.UrlResolutionResult[]

Resolves the url for the specified entity with its full domain paths based on all hostnames assigned.

GetUrlForEntity ( TypedEntity entity ) : UrlResolutionResult

Gets the URL.

This takes into account the current host name in the request. If the current host name matches a host name defined in the domain list for the entity being looked up, then the hostname of the current request will be used, otherwise the primary (first ordinal) domain will be used for the url.

Защищенные методы

Метод Описание
GetContentUrl ( TypedEntity entity ) : UrlResolutionResult

Gets the content URL.

This takes into account the current host name in the request. If the current host name matches a host name defined in the domain list for the entity being looked up, then the hostname of the current request will be used, otherwise the primary (first ordinal) domain will be used for the url.

GetDomainUrls ( IEnumerable ancestorsOrSelf ) : IEnumerable

Returns a list of URLs with the domains assigned based on the list of ancestorsOrSelf. If no domain is assigned to the branch that the entity exists in a null value is returned.

GetMediaUrl ( TypedEntity entity ) : UrlResolutionResult

Gets the media URL.

GetNonDomainUrl ( IEnumerable ancestorsOrSelf ) : UrlResolutionResult

Returns the non-domain URL for the 'self' node in ancestorsOrSelf or null if this node cannot exist in a non-domain branch.

Описание методов

ClearCache() публичный Метод

Clears the cache, removes domain cache items and content-url items
public ClearCache ( bool clearDomains = false, HiveId clearForIds = null, bool clearMappedUrls = false, bool clearGeneratedUrls = false, bool clearAll = false ) : void
clearDomains bool true to clear all domain cache
clearForIds HiveId will clear the URL
clearMappedUrls bool will clear the cache for all URLs mapped to entities
clearGeneratedUrls bool clears cache for all generated urls
clearAll bool Clears all cache
Результат void

DefaultRoutingEngine() публичный Метод

Initializes a new instance of the DefaultRoutingEngine class.
public DefaultRoutingEngine ( IRebelApplicationContext appContext, System.Web.HttpContextBase httpContext ) : System
appContext IRebelApplicationContext The routable request context.
httpContext System.Web.HttpContextBase
Результат System

FindEntityByUrl() публичный Метод

Finds a TypedEntity based on the Uri
public FindEntityByUrl ( Uri fullUrlIncludingDomain, RevisionStatusType revisionStatusType = null ) : EntityRouteResult
fullUrlIncludingDomain System.Uri
revisionStatusType RevisionStatusType
Результат EntityRouteResult

GetAllUrlsForEntity() публичный Метод

Resolves the url for the specified entity with its full domain paths based on all hostnames assigned.
public GetAllUrlsForEntity ( TypedEntity entity ) : Rebel.Cms.Web.Routing.UrlResolutionResult[]
entity TypedEntity
Результат Rebel.Cms.Web.Routing.UrlResolutionResult[]

GetContentUrl() защищенный Метод

Gets the content URL.
This takes into account the current host name in the request. If the current host name matches a host name defined in the domain list for the entity being looked up, then the hostname of the current request will be used, otherwise the primary (first ordinal) domain will be used for the url.
protected GetContentUrl ( TypedEntity entity ) : UrlResolutionResult
entity TypedEntity The entity.
Результат UrlResolutionResult

GetDomainUrls() защищенный Метод

Returns a list of URLs with the domains assigned based on the list of ancestorsOrSelf. If no domain is assigned to the branch that the entity exists in a null value is returned.
protected GetDomainUrls ( IEnumerable ancestorsOrSelf ) : IEnumerable
ancestorsOrSelf IEnumerable The ancestorsOrSelf list to create the URL for
Результат IEnumerable

GetMediaUrl() защищенный Метод

Gets the media URL.
protected GetMediaUrl ( TypedEntity entity ) : UrlResolutionResult
entity TypedEntity The entity.
Результат UrlResolutionResult

GetNonDomainUrl() защищенный Метод

Returns the non-domain URL for the 'self' node in ancestorsOrSelf or null if this node cannot exist in a non-domain branch.
protected GetNonDomainUrl ( IEnumerable ancestorsOrSelf ) : UrlResolutionResult
ancestorsOrSelf IEnumerable
Результат UrlResolutionResult

GetUrlForEntity() публичный Метод

Gets the URL.
This takes into account the current host name in the request. If the current host name matches a host name defined in the domain list for the entity being looked up, then the hostname of the current request will be used, otherwise the primary (first ordinal) domain will be used for the url.
public GetUrlForEntity ( TypedEntity entity ) : UrlResolutionResult
entity TypedEntity The entity.
Результат UrlResolutionResult