C# Класс Castle.MonoRail.Framework.Services.DefaultUrlTokenizer

Breaks the url into smaller pieces to find out the requested controller, action and optionally the area.

It alsos checks for default urls which map a single resource to an area/controller/action

Наследование: IUrlTokenizer, IServiceEnabledComponent
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddDefaultRule ( string url, string area, string controller, string action ) : void

Adds the default rule mapping.

A defautl rule can associate something like a 'default.castle' to a controller/action like 'Home/index.castle'

Service ( IServiceProvider provider ) : void

Services the specified provider.

TokenizeUrl ( string rawUrl, Uri uri, bool isLocal, string appVirtualDir ) : System.UrlInfo

Tokenizes the URL.

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

Метод Описание
GetDomainToken ( string domain, int token ) : string

Gets the domain token.

GetExtension ( string url ) : string

Gets the extension of the requested urls page without the preceding period.

Приватные методы

Метод Описание
ExtractAreaControllerAction ( string rawUrl, string &area, string &controller, string &action ) : void

Extracts the area controller action.

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

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

Adds the default rule mapping.
A defautl rule can associate something like a 'default.castle' to a controller/action like 'Home/index.castle'
public AddDefaultRule ( string url, string area, string controller, string action ) : void
url string The URL.
area string The area.
controller string The controller.
action string The action.
Результат void

GetDomainToken() защищенный статический Метод

Gets the domain token.
protected static GetDomainToken ( string domain, int token ) : string
domain string The domain.
token int The token index.
Результат string

GetExtension() защищенный статический Метод

Gets the extension of the requested urls page without the preceding period.
protected static GetExtension ( string url ) : string
url string URL.
Результат string

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

Services the specified provider.
public Service ( IServiceProvider provider ) : void
provider IServiceProvider The provider.
Результат void

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

Tokenizes the URL.
public TokenizeUrl ( string rawUrl, Uri uri, bool isLocal, string appVirtualDir ) : System.UrlInfo
rawUrl string The raw URL.
uri System.Uri The URI.
isLocal bool if set to true [is local].
appVirtualDir string Virtual directory
Результат System.UrlInfo