C# Class Open.Core.Common.ApplicationExtensions

Extensions for working with the Application object.
Afficher le fichier Open project: philcockfield/Open.TestHarness.SL

Méthodes publiques

Méthode 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 méthode

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').
Résultat string

GetClientBinPath() public static méthode

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

GetClientBinUrl() public static méthode

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').
Résultat string

GetQueryString() public static méthode

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).
Résultat string>>.IEnumerable

GetServerUrl() public static méthode

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

GetUrl() public static méthode

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

GetXapFileName() public static méthode

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