C# Class ScriptCs.WebApi.Formatter

Inheritance: System.Net.Http.Formatting.MediaTypeFormatter
ファイルを表示 Open project: scriptcs-contrib/scriptcs-webapi Class Usage Examples

Public Methods

Method Description
CanReadType ( Type type ) : bool
CanWriteType ( Type type ) : bool
Formatter ( bool>.Func canReadType, bool>.Func canWriteType, Func readFromStream, Task>.Func writeToStream ) : System
ReadFromStreamAsync ( Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger ) : Task
WriteToStreamAsync ( Type type, object value, Stream writeStream, HttpContent content, System.Net.TransportContext transportContext, CancellationToken cancellationToken ) : Task

Method Details

CanReadType() public method

public CanReadType ( Type type ) : bool
type System.Type
return bool

CanWriteType() public method

public CanWriteType ( Type type ) : bool
type System.Type
return bool

Formatter() public method

public Formatter ( bool>.Func canReadType, bool>.Func canWriteType, Func readFromStream, Task>.Func writeToStream ) : System
canReadType bool>.Func
canWriteType bool>.Func
readFromStream Func
writeToStream Task>.Func
return System

ReadFromStreamAsync() public method

public ReadFromStreamAsync ( Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger ) : Task
type System.Type
readStream Stream
content System.Net.Http.HttpContent
formatterLogger IFormatterLogger
return Task

WriteToStreamAsync() public method

public WriteToStreamAsync ( Type type, object value, Stream writeStream, HttpContent content, System.Net.TransportContext transportContext, CancellationToken cancellationToken ) : Task
type System.Type
value object
writeStream Stream
content System.Net.Http.HttpContent
transportContext System.Net.TransportContext
cancellationToken System.Threading.CancellationToken
return Task