C# Class Yammer.APIWrapper.OAuth.Rfc3986

Performs RFC 3986 encoding and decoding. http://www.apps.ietf.org/rfc/rfc3986.html
Mostrar archivo Open project: kdavie/Yammer.NET-2.0

Public Methods

Method Description
Decode ( string input ) : string

Perform RFC 3986 Percent-decoding on a string.

Encode ( string input ) : string

Perform RFC 3986 Percent-encoding on a string.

EncodeAndJoin ( NameValueCollection values ) : string

Join the name-value pairs into a string seperated with ampersands. Each name and value is first RFC 3986 encoded and values are separated from names with equal signs.

SplitAndDecode ( string input ) : NameValueCollection

Splits a ampersand-separated list of key-value pairs, decodes the keys and values, and adds them to a NameValueCollection. Keys and values are separated by equals signs.

Private Methods

Method Description
EncodeToBytes ( string input, Encoding enc ) : byte[]
IntToHex ( int n ) : char
NeedsEscaping ( char c ) : bool

Method Details

Decode() public static method

Perform RFC 3986 Percent-decoding on a string.
public static Decode ( string input ) : string
input string The input RFC 3986 Percent-encoded string
return string

Encode() public static method

Perform RFC 3986 Percent-encoding on a string.
public static Encode ( string input ) : string
input string The input string
return string

EncodeAndJoin() public static method

Join the name-value pairs into a string seperated with ampersands. Each name and value is first RFC 3986 encoded and values are separated from names with equal signs.
public static EncodeAndJoin ( NameValueCollection values ) : string
values System.Collections.Specialized.NameValueCollection The name value collection to encode and join
return string

SplitAndDecode() public static method

Splits a ampersand-separated list of key-value pairs, decodes the keys and values, and adds them to a NameValueCollection. Keys and values are separated by equals signs.
/// If the string is not a series of key-value pairs separated by ampersands, /// or if one of the keys is null or empty, or if one of the keys or values is /// not properly encoded. ///
public static SplitAndDecode ( string input ) : NameValueCollection
input string The key-value pair list
return System.Collections.Specialized.NameValueCollection