C# Class Hyper.Http.Formatting.JsonMediaTypeFormatter

HyperJsonMediaTypeFormatter class.
Inheritance: System.Net.Http.Formatting.MediaTypeFormatter
Mostra file Open project: tmitchel2/Hyper

Public Methods

Method Description
CanReadType ( Type type ) : bool

Queries whether this T:System.Net.Http.Formatting.MediaTypeFormatter can deserializean object of the specified type.

CanWriteType ( Type type ) : bool

Queries whether this T:System.Net.Http.Formatting.MediaTypeFormatter can serializean object of the specified type.

ReadFromStreamAsync ( Type type, Stream readStream, System content, IFormatterLogger formatterLogger ) : Task

Asynchronously deserializes an object of the specified type.

WriteToStreamAsync ( Type type, object value, Stream writeStream, System content, System.Net.TransportContext transportContext ) : System.Threading.Tasks.Task

Asynchronously writes an object of the specified type.

Method Details

CanReadType() public method

Queries whether this T:System.Net.Http.Formatting.MediaTypeFormatter can deserializean object of the specified type.
public CanReadType ( Type type ) : bool
type System.Type The type to deserialize.
return bool

CanWriteType() public method

Queries whether this T:System.Net.Http.Formatting.MediaTypeFormatter can serializean object of the specified type.
public CanWriteType ( Type type ) : bool
type System.Type The type to serialize.
return bool

ReadFromStreamAsync() public method

Asynchronously deserializes an object of the specified type.
public ReadFromStreamAsync ( Type type, Stream readStream, System content, IFormatterLogger formatterLogger ) : Task
type System.Type The type of the object to deserialize.
readStream Stream The to read.
content System The , if available. It may be null.
formatterLogger IFormatterLogger The to log events to.
return Task

WriteToStreamAsync() public method

Asynchronously writes an object of the specified type.
public WriteToStreamAsync ( Type type, object value, Stream writeStream, System content, System.Net.TransportContext transportContext ) : System.Threading.Tasks.Task
type System.Type The type of the object to write.
value object The object value to write. It may be null.
writeStream Stream The to which to write.
content System The if available. It may be null.
transportContext System.Net.TransportContext The if available. It may be null.
return System.Threading.Tasks.Task