Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Represents a helper class to allow a synchronous formatter on top of the asynchronous formatter infrastructure.
Inheritance Hierarchy
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)
Syntax
'Declaration
Public MustInherit Class BufferedMediaTypeFormatter _
Inherits MediaTypeFormatter
'Usage
Dim instance As BufferedMediaTypeFormatter
public abstract class BufferedMediaTypeFormatter : MediaTypeFormatter
public ref class BufferedMediaTypeFormatter abstract : public MediaTypeFormatter
[<AbstractClassAttribute>]
type BufferedMediaTypeFormatter =
class
inherit MediaTypeFormatter
end
public abstract class BufferedMediaTypeFormatter extends MediaTypeFormatter
The BufferedMediaTypeFormatter type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
![]() |
BufferedMediaTypeFormatter | Initializes a new instance of the BufferedMediaTypeFormatter class. |
Top
Properties
| Name | Description | |
|---|---|---|
![]() |
BufferSize | Gets or sets the suggested size of buffer to use with streams in bytes. |
![]() |
MediaTypeMappings | Gets the mutable collection of MediaTypeMapping objects that match HTTP requests to media types. (Inherited from MediaTypeFormatter.) |
![]() |
RequiredMemberSelector | Gets or sets the IRequiredMemberSelector instance used to determine required members. (Inherited from MediaTypeFormatter.) |
![]() |
SupportedEncodings | Gets the mutable collection of character encodings supported bythis MediaTypeFormatter. (Inherited from MediaTypeFormatter.) |
![]() |
SupportedMediaTypes | Gets the mutable collection of media types supported bythis MediaTypeFormatter. (Inherited from MediaTypeFormatter.) |
Top
Methods
| Name | Description | |
|---|---|---|
![]() |
CanReadType | Queries whether this MediaTypeFormatter can deserializean object of the specified type. (Inherited from MediaTypeFormatter.) |
![]() |
CanWriteType | Queries whether this MediaTypeFormatter can serializean object of the specified type. (Inherited from MediaTypeFormatter.) |
![]() |
Equals | (Inherited from Object.) |
![]() |
Finalize | (Inherited from Object.) |
![]() |
GetHashCode | (Inherited from Object.) |
![]() |
GetPerRequestFormatterInstance | Returns a specialized instance of the MediaTypeFormatter that can format a response for the given parameters. (Inherited from MediaTypeFormatter.) |
![]() |
GetType | (Inherited from Object.) |
![]() |
MemberwiseClone | (Inherited from Object.) |
![]() |
ReadFromStream | Reads synchronously from the buffered stream. |
![]() |
ReadFromStreamAsync | Reads asynchronously from the buffered stream. (Overrides MediaTypeFormatter.ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger).) |
![]() |
SelectCharacterEncoding | Determines the best character encoding for reading or writing an HTTP entity body, given a set of content headers. (Inherited from MediaTypeFormatter.) |
![]() |
SetDefaultContentHeaders | 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.) |
![]() |
ToString | (Inherited from Object.) |
![]() |
WriteToStream | Writes synchronously to the buffered stream. |
![]() |
WriteToStreamAsync | Writes asynchronously to the buffered stream. (Overrides MediaTypeFormatter.WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext).) |
Top
Extension Methods
| Name | Description | |
|---|---|---|
![]() |
AddQueryStringMapping(String, String, MediaTypeHeaderValue) | Overloaded. Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with Uris containing a specific query parameter and value. (Defined by MediaTypeFormatterExtensions.) |
![]() |
AddQueryStringMapping(String, String, String) | Overloaded. Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with Uris containing a specific query parameter and value. (Defined by MediaTypeFormatterExtensions.) |
![]() |
AddRequestHeaderMapping(String, String, StringComparison, Boolean, MediaTypeHeaderValue) | Overloaded. Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with a specific HTTP request header field with a specific value. (Defined by MediaTypeFormatterExtensions.) |
![]() |
AddRequestHeaderMapping(String, String, StringComparison, Boolean, String) | Overloaded. Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with a specific HTTP request header field with a specific value. (Defined by MediaTypeFormatterExtensions.) |
![]() |
AddUriPathExtensionMapping(String, MediaTypeHeaderValue) | Overloaded. Updates the given formatter's set of MediaTypeMapping elements so that it associates the mediaType with Uris ending with the given uriPathExtension. (Defined by MediaTypeFormatterExtensions.) |
![]() |
AddUriPathExtensionMapping(String, String) | Overloaded. Updates the given formatter's set of MediaTypeMapping elements so that it associates the mediaType with Uris ending with the given uriPathExtension. (Defined by MediaTypeFormatterExtensions.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
.jpeg)
.jpeg)
.jpeg)
.gif)