C# Class WebApiContrib.Formatting.ProtoBufFormatter

Inheritance: System.Net.Http.Formatting.MediaTypeFormatter
ファイルを表示 Open project: WebApiContrib/WebApiContrib.Formatting.ProtoBuf Class Usage Examples

Public Methods

Method Description
CanReadType ( Type type ) : bool
CanWriteType ( Type type ) : bool
ProtoBufFormatter ( ) : System
ReadFromStreamAsync ( Type type, Stream stream, HttpContent content, IFormatterLogger formatterLogger ) : Task
WriteToStreamAsync ( Type type, object value, Stream stream, HttpContent content, System.Net.TransportContext transportContext ) : System.Threading.Tasks.Task

Private Methods

Method Description
CanReadTypeCore ( Type type ) : bool
CreateTypeModel ( ) : ProtoBuf.Meta.RuntimeTypeModel

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

ProtoBufFormatter() public method

public ProtoBufFormatter ( ) : System
return System

ReadFromStreamAsync() public method

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

WriteToStreamAsync() public method

public WriteToStreamAsync ( Type type, object value, Stream stream, HttpContent content, System.Net.TransportContext transportContext ) : System.Threading.Tasks.Task
type System.Type
value object
stream Stream
content HttpContent
transportContext System.Net.TransportContext
return System.Threading.Tasks.Task