C# Class Open.Core.Common.UrlHash

Represents the 'hash' portion of the browser's URL (occuring after the # charachter)
Datei anzeigen Open project: philcockfield/Open.TestHarness.SL

Public Methods

Method Description
GetValue ( string key ) : string

Gets the value corresponding to the given key in a case-insensitive manner (eg. from a URL ending in #key=value).

SetValue ( string key, string value ) : void

Adds, or updates, the key-value pair to the URL hash in non-destructive manner.

Non-destructive means that the existing values within the URL hash are retained.

SetValues ( string>.Dictionary values ) : void

Converts the given dictionary to a URL-hash and replaces the current URL-hash with this value.

Use this method, in conjuction with the ValueDictionary to perform non-destructive edits to the URL-hash.

Private Methods

Method Description
GetDictionary ( bool keyToLower ) : string>.Dictionary
ToUrlHash ( string>.Dictionary values ) : string

Method Details

GetValue() public static method

Gets the value corresponding to the given key in a case-insensitive manner (eg. from a URL ending in #key=value).
public static GetValue ( string key ) : string
key string The key of the value (not case-sensitive).
return string

SetValue() public static method

Adds, or updates, the key-value pair to the URL hash in non-destructive manner.
Non-destructive means that the existing values within the URL hash are retained.
public static SetValue ( string key, string value ) : void
key string The key of the value (case-sensitive).
value string The value (pass null to remove).
return void

SetValues() public static method

Converts the given dictionary to a URL-hash and replaces the current URL-hash with this value.
Use this method, in conjuction with the ValueDictionary to perform non-destructive edits to the URL-hash.
public static SetValues ( string>.Dictionary values ) : void
values string>.Dictionary A dictionary of values (like the dictionary retreived from the 'ValueDictionary' property).
return void