C# Class Hyper.Http.Formatting.JsonMediaTypeFormatter

HyperJsonMediaTypeFormatter class.
Inheritance: System.Net.Http.Formatting.MediaTypeFormatter
Afficher le fichier Open project: tmitchel2/Hyper

Méthodes publiques

Méthode 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 méthode

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.
Résultat bool

CanWriteType() public méthode

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.
Résultat bool

ReadFromStreamAsync() public méthode

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.
Résultat Task

WriteToStreamAsync() public méthode

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.
Résultat System.Threading.Tasks.Task