ODataMediaTypeFormatter Class
Represents the MediaTypeFormatter class to handle OData.
Inheritance Hierarchy
System.Object
System.Net.Http.Formatting.MediaTypeFormatter
System.Web.Http.OData.Formatter.ODataMediaTypeFormatter
Namespace: System.Web.Http.OData.Formatter
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
'Declaration
Public Class ODataMediaTypeFormatter _
Inherits MediaTypeFormatter
'Usage
Dim instance As ODataMediaTypeFormatter
public class ODataMediaTypeFormatter : MediaTypeFormatter
public ref class ODataMediaTypeFormatter : public MediaTypeFormatter
type ODataMediaTypeFormatter =
class
inherit MediaTypeFormatter
end
public class ODataMediaTypeFormatter extends MediaTypeFormatter
The ODataMediaTypeFormatter type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ODataMediaTypeFormatter(IEnumerable<ODataPayloadKind>) | Initializes a new instance of the ODataMediaTypeFormatter class. | |
ODataMediaTypeFormatter(ODataDeserializerProvider, ODataSerializerProvider, IEnumerable<ODataPayloadKind>) | Initializes a new instance of the ODataMediaTypeFormatter class. |
Top
Properties
Name | Description | |
---|---|---|
DeserializerProvider | Gets the ODataDeserializerProvider that will be used by this formatter instance. | |
MediaTypeMappings | (Inherited from MediaTypeFormatter.) | |
MessageReaderQuotas | Gets or sets the ODataMessageQuotas that this formatter uses on the reader side. | |
MessageReaderSettings | Gets the settings to be use while reading requests. | |
MessageWriterQuotas | Gets or sets the ODataMessageQuotas that this formatter uses on the writer side. | |
MessageWriterSettings | Gets the settings to be use while writing responses. | |
RequiredMemberSelector | (Inherited from MediaTypeFormatter.) | |
SerializerProvider | Gets the ODataSerializerProvider that will be used by this formatter instance. | |
SupportedEncodings | (Inherited from MediaTypeFormatter.) | |
SupportedMediaTypes | (Inherited from MediaTypeFormatter.) |
Top
Methods
Name | Description | |
---|---|---|
CanReadType | Queries whether this MediaTypeFormatter can deserialize an object of the specified type. (Overrides MediaTypeFormatter.CanReadType(Type).) | |
CanWriteType | Queries whether this MediaTypeFormatter can serialize an object of the specified type. (Overrides MediaTypeFormatter.CanWriteType(Type).) | |
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. (Overrides MediaTypeFormatter.GetPerRequestFormatterInstance(Type, HttpRequestMessage, MediaTypeHeaderValue).) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger) | Asynchronously deserializes an object of the specified type. (Overrides MediaTypeFormatter.ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger).) | |
ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger, CancellationToken) | (Inherited from MediaTypeFormatter.) | |
SelectCharacterEncoding | (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. (Overrides MediaTypeFormatter.SetDefaultContentHeaders(Type, HttpContentHeaders, MediaTypeHeaderValue).) | |
ToString | (Inherited from Object.) | |
WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext) | (Inherited from MediaTypeFormatter.) | |
WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext, CancellationToken) | Asynchronously writes an object of the specified type. (Overrides MediaTypeFormatter.WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext, CancellationToken).) |
Top
Remarks
No content here will be updated; please do not add material here.
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.