C# Class Temp.FormattingUtilities

Provides various internal utility functions
Mostra file Open project: anurse/ReviewR

Public Properties

Property Type Description
EnumerableInterfaceGenericType System.Type
HttpContentType System.Type
HttpRequestMessageType System.Type
HttpResponseMessageType System.Type
QueryableInterfaceGenericType System.Type
Utf16EncodingType System.Type
Utf8EncodingType System.Type

Public Methods

Method Description
CreateEmptyContentHeaders ( ) : HttpContentHeaders

Creates an empty HttpContentHeaders instance. The only way is to get it from a dummy HttpContent instance.

DateToString ( DateTimeOffset dateTime ) : string
TryParseDate ( string input, DateTimeOffset &result ) : bool
TryParseInt32 ( string value, int &result ) : bool

Parses valid integer strings with no leading signs, whitespace or other NumberStyles

UnquoteToken ( string token ) : string

Remove bounding quotes on a token if present

ValidateCollection ( Collection actual, MediaTypeHeaderValue expected ) : bool

Ensure the actual collection is identical to the expected one

ValidateHeaderToken ( string token ) : bool

Method Details

CreateEmptyContentHeaders() public static method

Creates an empty HttpContentHeaders instance. The only way is to get it from a dummy HttpContent instance.
public static CreateEmptyContentHeaders ( ) : HttpContentHeaders
return System.Net.Http.Headers.HttpContentHeaders

DateToString() public static method

public static DateToString ( DateTimeOffset dateTime ) : string
dateTime DateTimeOffset
return string

TryParseDate() public static method

public static TryParseDate ( string input, DateTimeOffset &result ) : bool
input string
result DateTimeOffset
return bool

TryParseInt32() public static method

Parses valid integer strings with no leading signs, whitespace or other NumberStyles
public static TryParseInt32 ( string value, int &result ) : bool
value string The value to parse
result int The result
return bool

UnquoteToken() public static method

Remove bounding quotes on a token if present
public static UnquoteToken ( string token ) : string
token string Token to unquote.
return string

ValidateCollection() public static method

Ensure the actual collection is identical to the expected one
public static ValidateCollection ( Collection actual, MediaTypeHeaderValue expected ) : bool
actual Collection The actual collection of the instance
expected System.Net.Http.Headers.MediaTypeHeaderValue The expected collection of the instance
return bool

ValidateHeaderToken() public static method

public static ValidateHeaderToken ( string token ) : bool
token string
return bool

Property Details

EnumerableInterfaceGenericType public_oe static_oe property

A Type representing IEnumerable{T}.
public static Type,System EnumerableInterfaceGenericType
return System.Type

HttpContentType public_oe static_oe property

A Type representing HttpContent.
public static Type,System HttpContentType
return System.Type

HttpRequestMessageType public_oe static_oe property

A Type representing HttpRequestMessage.
public static Type,System HttpRequestMessageType
return System.Type

HttpResponseMessageType public_oe static_oe property

A Type representing HttpResponseMessage.
public static Type,System HttpResponseMessageType
return System.Type

QueryableInterfaceGenericType public_oe static_oe property

A Type representing IQueryable{T}.
public static Type,System QueryableInterfaceGenericType
return System.Type

Utf16EncodingType public_oe static_oe property

A Type representing UnicodeEncoding.
public static Type,System Utf16EncodingType
return System.Type

Utf8EncodingType public_oe static_oe property

A Type representing UTF8Encoding.
public static Type,System Utf8EncodingType
return System.Type