C# Класс Saule.Http.JsonApiMediaTypeFormatter

Custom media type formatter for Json Api (1.0) responses and requests.
Наследование: System.Net.Http.Formatting.MediaTypeFormatter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CanReadType ( Type type ) : bool
CanWriteType ( Type type ) : bool
GetPerRequestFormatterInstance ( Type type, HttpRequestMessage request, MediaTypeHeaderValue mediaType ) : System.Net.Http.Formatting.MediaTypeFormatter
ReadFromStreamAsync ( Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger ) : Task
WriteToStreamAsync ( Type type, object value, Stream writeStream, HttpContent content, System.Net.TransportContext transportContext ) : System.Threading.Tasks.Task

Приватные методы

Метод Описание
JsonApiMediaTypeFormatter ( ) : System
JsonApiMediaTypeFormatter ( HttpRequestMessage request, Saule.Http.JsonApiConfiguration config ) : System
JsonApiMediaTypeFormatter ( IUrlPathBuilder urlBuilder ) : System
JsonApiMediaTypeFormatter ( Saule.Http.JsonApiConfiguration config ) : System
WriteJsonToStream ( JToken json, Stream stream ) : System.Threading.Tasks.Task

Описание методов

CanReadType() публичный Метод

public CanReadType ( Type type ) : bool
type System.Type
Результат bool

CanWriteType() публичный Метод

public CanWriteType ( Type type ) : bool
type System.Type
Результат bool

GetPerRequestFormatterInstance() публичный Метод

public GetPerRequestFormatterInstance ( Type type, HttpRequestMessage request, MediaTypeHeaderValue mediaType ) : System.Net.Http.Formatting.MediaTypeFormatter
type System.Type
request System.Net.Http.HttpRequestMessage
mediaType System.Net.Http.Headers.MediaTypeHeaderValue
Результат System.Net.Http.Formatting.MediaTypeFormatter

ReadFromStreamAsync() публичный Метод

public ReadFromStreamAsync ( Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger ) : Task
type System.Type
readStream Stream
content System.Net.Http.HttpContent
formatterLogger IFormatterLogger
Результат Task

WriteToStreamAsync() публичный Метод

public WriteToStreamAsync ( Type type, object value, Stream writeStream, HttpContent content, System.Net.TransportContext transportContext ) : System.Threading.Tasks.Task
type System.Type
value object
writeStream Stream
content System.Net.Http.HttpContent
transportContext System.Net.TransportContext
Результат System.Threading.Tasks.Task