Export (0) Print
Expand All

BufferedMediaTypeFormatter Class

Represents a helper class to allow a synchronous formatter on top of the asynchronous formatter infrastructure.

System.Object
  System.Net.Http.Formatting.MediaTypeFormatter
    System.Net.Http.Formatting.BufferedMediaTypeFormatter

Namespace:  System.Net.Http.Formatting
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

public abstract class BufferedMediaTypeFormatter : MediaTypeFormatter

The BufferedMediaTypeFormatter type exposes the following members.

  NameDescription
Protected methodBufferedMediaTypeFormatter()Initializes a new instance of the BufferedMediaTypeFormatter class.
Protected methodBufferedMediaTypeFormatter(BufferedMediaTypeFormatter)Initializes a new instance of the BufferedMediaTypeFormatter class.
Top

  NameDescription
Public propertyBufferSizeGets or sets the suggested size of buffer to use with streams in bytes.
Public propertyMediaTypeMappingsGets the mutable collection of MediaTypeMapping objects that match HTTP requests to media types. (Inherited from MediaTypeFormatter.)
Public propertyRequiredMemberSelectorGets or sets the IRequiredMemberSelector instance used to determine required members. (Inherited from MediaTypeFormatter.)
Public propertySupportedEncodingsGets the mutable collection of character encodings supported bythis MediaTypeFormatter. (Inherited from MediaTypeFormatter.)
Public propertySupportedMediaTypesGets the mutable collection of media types supported bythis MediaTypeFormatter. (Inherited from MediaTypeFormatter.)
Top

  NameDescription
Public methodCanReadTypeQueries whether this MediaTypeFormatter can deserializean object of the specified type. (Inherited from MediaTypeFormatter.)
Public methodCanWriteTypeQueries whether this MediaTypeFormatter can serializean object of the specified type. (Inherited from MediaTypeFormatter.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetPerRequestFormatterInstanceReturns a specialized instance of the MediaTypeFormatter that can format a response for the given parameters. (Inherited from MediaTypeFormatter.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodReadFromStream(Type, Stream, HttpContent, IFormatterLogger)Reads synchronously from the buffered stream.
Public methodReadFromStream(Type, Stream, HttpContent, IFormatterLogger, CancellationToken)Reads synchronously from the buffered stream.
Public methodReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger)Reads asynchronously from the buffered stream. (Overrides MediaTypeFormatter.ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger).)
Public methodReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger, CancellationToken)Reads asynchronously from the buffered stream. (Overrides MediaTypeFormatter.ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger, CancellationToken).)
Public methodSelectCharacterEncodingDetermines the best character encoding for reading or writing an HTTP entity body, given a set of content headers. (Inherited from MediaTypeFormatter.)
Public methodSetDefaultContentHeaders Sets the default headers for content that will be formatted using this formatter. This method is called from the ObjectContent constructor. This implementation sets the Content-Type header to the value of mediaType if it is not null. If it is null it sets the Content-Type to the default media type of this formatter. If the Content-Type does not specify a charset it will set it using this formatters configured Encoding. (Inherited from MediaTypeFormatter.)
Public methodToString (Inherited from Object.)
Public methodWriteToStream(Type, Object, Stream, HttpContent)Writes synchronously to the buffered stream.
Public methodWriteToStream(Type, Object, Stream, HttpContent, CancellationToken)Writes synchronously to the buffered stream.
Public methodWriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext)Writes asynchronously to the buffered stream. (Overrides MediaTypeFormatter.WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext).)
Public methodWriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext, CancellationToken)Writes asynchronously to the buffered stream. (Overrides MediaTypeFormatter.WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext, CancellationToken).)
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft