C# Class NGM.CasClient.Client.Utils.EnhancedUriBuilder

Enhanced UriBuilder class with collection-based query string access.
Adapted from http://forums.asp.net/t/693414.aspx
Inheritance: System.UriBuilder
Mostra file Open project: NIKASoftwareDevs/Orchard Class Usage Examples

Public Methods

Method Description
Combine ( string hostOrPathPortion, string pathPortion ) : string

Concatenates two portions of a Url, stripping duplicate forward-slashes.

EnhancedUriBuilder ( ) : System

Initializes an EnhancedUriBuilder with no Uri data

EnhancedUriBuilder ( Uri uri ) : System

Initializes an EnhancedUriBuilder with the Uri supplied.

EnhancedUriBuilder ( string uri ) : System

Initializes an EnhancedUriBuilder with the Uri supplied.

EnhancedUriBuilder ( string schemeName, string hostName ) : System

Initializes an EnhancedUriBuilder with the schemeName and hostName supplied.

EnhancedUriBuilder ( string scheme, string host, int portNumber ) : System

Initializes an EnhancedUriBuilder with the scheme, host, and portNumber supplied.

EnhancedUriBuilder ( string scheme, string host, int port, string pathValue ) : System

Initializes an EnhancedUriBuilder with the scheme, host, port, and pathValue supplied.

EnhancedUriBuilder ( string scheme, string host, int port, string path, string extraValue ) : System

Initializes an EnhancedUriBuilder with the scheme, host, port, path, and extraValue supplied.

ToString ( ) : string

The string representation of the EnhancedUriBuilder

Use of this method is discouraged. You will generally want to return the Uri.RawUri property instead as ToString() will include standard port numbers where they generally are not necessary (:80 and :443).

Private Methods

Method Description
CreateItemsFromQuery ( ) : void

Rebuilds the query item collection from its string representation.

CreateQueryFromItems ( ) : void

Rebuilds the string representation of the query from the query item collection.

SyncQuery ( ) : void

Refreshes the string representation of the query if the query item collection is marked as dirty.

SyncQueryItems ( ) : void

Refreshes the query item collection if the query is marked as dirty.

Method Details

Combine() public static method

Concatenates two portions of a Url, stripping duplicate forward-slashes.
public static Combine ( string hostOrPathPortion, string pathPortion ) : string
hostOrPathPortion string The left-hand side of the Url to be combined
pathPortion string The right-hand side of the Url to be combined
return string

EnhancedUriBuilder() public method

Initializes an EnhancedUriBuilder with no Uri data
public EnhancedUriBuilder ( ) : System
return System

EnhancedUriBuilder() public method

Initializes an EnhancedUriBuilder with the Uri supplied.
public EnhancedUriBuilder ( Uri uri ) : System
uri System.Uri The Uri to initialize with
return System

EnhancedUriBuilder() public method

Initializes an EnhancedUriBuilder with the Uri supplied.
public EnhancedUriBuilder ( string uri ) : System
uri string The string representation of a Uri to initialize with
return System

EnhancedUriBuilder() public method

Initializes an EnhancedUriBuilder with the schemeName and hostName supplied.
public EnhancedUriBuilder ( string schemeName, string hostName ) : System
schemeName string The schemeName to initialize with
hostName string The hostName to initialize with
return System

EnhancedUriBuilder() public method

Initializes an EnhancedUriBuilder with the scheme, host, and portNumber supplied.
public EnhancedUriBuilder ( string scheme, string host, int portNumber ) : System
scheme string The scheme to initialize with
host string The host to initialize with
portNumber int The portNumber to initialize with
return System

EnhancedUriBuilder() public method

Initializes an EnhancedUriBuilder with the scheme, host, port, and pathValue supplied.
public EnhancedUriBuilder ( string scheme, string host, int port, string pathValue ) : System
scheme string The scheme to initialize with
host string The host to initialize with
port int The port to initialize with
pathValue string The pathValue to initialize with
return System

EnhancedUriBuilder() public method

Initializes an EnhancedUriBuilder with the scheme, host, port, path, and extraValue supplied.
public EnhancedUriBuilder ( string scheme, string host, int port, string path, string extraValue ) : System
scheme string The scheme to initialize with
host string The host to initialize with
port int The port to initialize with
path string The path to initialize with
extraValue string The extraValue to initialize with
return System

ToString() public method

The string representation of the EnhancedUriBuilder
Use of this method is discouraged. You will generally want to return the Uri.RawUri property instead as ToString() will include standard port numbers where they generally are not necessary (:80 and :443).
public ToString ( ) : string
return string