C# Class MvcApi.Formatting.FormattingUtilities

Provides various internal utility functions
Exibir arquivo Open project: dax70/MvcApi

Public Properties

Property Type Description
DelegatingEnumerableGenericType System.Type
EnumerableInterfaceGenericType System.Type
HttpContentType System.Type
HttpRequestMessageType System.Type
HttpResponseMessageType System.Type
QueryableInterfaceGenericType System.Type
XsdDataContractExporter System.Runtime.Serialization.XsdDataContractExporter

Public Methods

Method Description
CreateDefaultReaderQuotas ( ) : XmlDictionaryReaderQuotas

Create a default reader quotas with a default depth quota of 1K

CreateEmptyContentHeaders ( ) : HttpContentHeaders

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

DateToString ( DateTimeOffset dateTime ) : string
IsJTokenType ( Type type ) : bool

Determines whether type is a JToken type.

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

ValidateHeaderToken ( string token ) : bool

Method Details

CreateDefaultReaderQuotas() public static method

Create a default reader quotas with a default depth quota of 1K
public static CreateDefaultReaderQuotas ( ) : XmlDictionaryReaderQuotas
return System.Xml.XmlDictionaryReaderQuotas

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

IsJTokenType() public static method

Determines whether type is a JToken type.
public static IsJTokenType ( Type type ) : bool
type System.Type The type to test.
return bool

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

ValidateHeaderToken() public static method

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

Property Details

DelegatingEnumerableGenericType public_oe static_oe property

A Type representing DelegatingEnumerable{T}.
public static Type,System DelegatingEnumerableGenericType
return System.Type

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

XsdDataContractExporter public_oe static_oe property

An instance of XsdDataContractExporter.
public static XsdDataContractExporter,System.Runtime.Serialization XsdDataContractExporter
return System.Runtime.Serialization.XsdDataContractExporter