C# Class Open.Core.Common.ApplicationExtensions

Extensions for working with the Application object.
Datei anzeigen Open project: philcockfield/Open.TestHarness.SL

Public Methods

Method Description
GetApplicationRootUrl ( this application ) : string

Retrieves the URL path up to the root of the server application (the folder above the ClientBin).

This assumes the XAP file is hosted in a folder which is at the root of the application.

GetClientBinPath ( this application ) : string

Retrieves the path up to the folder the XAP file.

GetClientBinUrl ( this application ) : string

Retrieves the URL path up to the folder the XAP file is running within, including the server URL.

GetQueryString ( this application ) : string>>.IEnumerable

Retrieves the query string (as a set of Key:Value pairs).

The query string is assumed to start at a '?' character, and be a set of 'key=value' pairs seperated by the '&' delimiter character.
For example: http://domain.com?a=b&b=c;

GetServerUrl ( this application ) : string

Retrieves the current [http://domain]:[port] value.

GetUrl ( this application ) : string

Gets the current URL and port formatted with the 'http://' prefix.

GetXapFileName ( this application ) : string

Retrieves the name of the XAP file of the application.

Method Details

GetApplicationRootUrl() public static method

Retrieves the URL path up to the root of the server application (the folder above the ClientBin).
This assumes the XAP file is hosted in a folder which is at the root of the application.
public static GetApplicationRootUrl ( this application ) : string
application this The application instance (use 'Application.Current').
return string

GetClientBinPath() public static method

Retrieves the path up to the folder the XAP file.
public static GetClientBinPath ( this application ) : string
application this The application instance (use 'Application.Current').
return string

GetClientBinUrl() public static method

Retrieves the URL path up to the folder the XAP file is running within, including the server URL.
public static GetClientBinUrl ( this application ) : string
application this The application instance (use 'Application.Current').
return string

GetQueryString() public static method

Retrieves the query string (as a set of Key:Value pairs).
The query string is assumed to start at a '?' character, and be a set of 'key=value' pairs seperated by the '&' delimiter character.
For example: http://domain.com?a=b&b=c;
public static GetQueryString ( this application ) : string>>.IEnumerable
application this The application to read from (Use 'Application.Current' to retreive this).
return string>>.IEnumerable

GetServerUrl() public static method

Retrieves the current [http://domain]:[port] value.
public static GetServerUrl ( this application ) : string
application this The application instance (use 'Application.Current').
return string

GetUrl() public static method

Gets the current URL and port formatted with the 'http://' prefix.
public static GetUrl ( this application ) : string
application this The application to read from (Use 'Application.Current' to retreive this).
return string

GetXapFileName() public static method

Retrieves the name of the XAP file of the application.
public static GetXapFileName ( this application ) : string
application this The application instance (use 'Application.Current').
return string