C# Class 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

Inheritance: IUrlTokenizer, IServiceEnabledComponent
Afficher le fichier Open project: nats/castle-1.0.3-mono Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
ExtractAreaControllerAction ( string rawUrl, string &area, string &controller, string &action ) : void

Extracts the area controller action.

Method Details

AddDefaultRule() public méthode

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.
Résultat void

GetDomainToken() protected static méthode

Gets the domain token.
protected static GetDomainToken ( string domain, int token ) : string
domain string The domain.
token int The token index.
Résultat string

GetExtension() protected static méthode

Gets the extension of the requested urls page without the preceding period.
protected static GetExtension ( string url ) : string
url string URL.
Résultat string

Service() public méthode

Services the specified provider.
public Service ( IServiceProvider provider ) : void
provider IServiceProvider The provider.
Résultat void

TokenizeUrl() public méthode

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
Résultat System.UrlInfo