C# Class ScrewTurn.Wiki.UrlTools

Implements useful URL-handling tools.
显示文件 Open project: mono/ScrewTurnWiki Class Usage Examples

Public Methods

Method Description
BuildUrl ( ) : string

Builds a URL properly prepending the namespace to the URL.

BuildUrl ( StringBuilder destination ) : void

Builds a URL properly appendind the NS parameter if appropriate.

GetCurrentNamespace ( ) : string

Extracts the current namespace from the URL, such as /App/Namespace.Edit.aspx.

Redirect ( string target ) : void

Redirects the current response to the specified URL, properly appending the current namespace if any.

Redirect ( string target, bool addNamespace ) : void

Redirects the current response to the specified URL, appending the current namespace if requested.

RedirectHome ( ) : void

Redirects to the default page of the current namespace.

RouteCurrentRequest ( ) : void

Properly routes the current virtual request to a physical ASP.NET page.

Method Details

BuildUrl() public static method

Builds a URL properly prepending the namespace to the URL.
public static BuildUrl ( ) : string
return string

BuildUrl() public static method

Builds a URL properly appendind the NS parameter if appropriate.
public static BuildUrl ( StringBuilder destination ) : void
destination StringBuilder The destination .
return void

GetCurrentNamespace() public static method

Extracts the current namespace from the URL, such as /App/Namespace.Edit.aspx.
public static GetCurrentNamespace ( ) : string
return string

Redirect() public static method

Redirects the current response to the specified URL, properly appending the current namespace if any.
public static Redirect ( string target ) : void
target string The target URL.
return void

Redirect() public static method

Redirects the current response to the specified URL, appending the current namespace if requested.
public static Redirect ( string target, bool addNamespace ) : void
target string The target URL.
addNamespace bool A value indicating whether to add the namespace.
return void

RedirectHome() public static method

Redirects to the default page of the current namespace.
public static RedirectHome ( ) : void
return void

RouteCurrentRequest() public static method

Properly routes the current virtual request to a physical ASP.NET page.
public static RouteCurrentRequest ( ) : void
return void