ODataMediaTypeFormatter Class

 

MediaTypeFormatter class to handle OData.

Namespace:   System.Web.OData.Formatter
Assembly:  System.Web.OData (in System.Web.OData.dll)

Inheritance Hierarchy

System.Object
  System.Net.Http.Formatting.MediaTypeFormatter
    System.Web.OData.Formatter.ODataMediaTypeFormatter

Syntax

public class ODataMediaTypeFormatter : MediaTypeFormatter
public ref class ODataMediaTypeFormatter : MediaTypeFormatter
type ODataMediaTypeFormatter = 
    class
        inherit MediaTypeFormatter
    end
Public Class ODataMediaTypeFormatter
    Inherits MediaTypeFormatter

Constructors

Name Description
System_CAPS_pubmethod ODataMediaTypeFormatter(IEnumerable<ODataPayloadKind>)

Initializes a new instance of the ODataMediaTypeFormatter class.

System_CAPS_pubmethod ODataMediaTypeFormatter(ODataDeserializerProvider, ODataSerializerProvider, IEnumerable<ODataPayloadKind>)

Initializes a new instance of the ODataMediaTypeFormatter class.

Properties

Name Description
System_CAPS_pubproperty DeserializerProvider

Gets the ODataDeserializerProvider that will be used by this formatter instance.

System_CAPS_pubproperty MediaTypeMappings

Gets the mutable collection of MediaTypeMapping objects that match HTTP requests to media types.(Inherited from MediaTypeFormatter.)

System_CAPS_pubproperty MessageReaderQuotas

Gets the ODataMessageQuotas that this formatter uses on the read side.

System_CAPS_pubproperty MessageReaderSettings

Gets the ODataMessageReaderSettings to be used while reading requests.

System_CAPS_pubproperty MessageWriterQuotas

Gets the ODataMessageQuotas that this formatter uses on the write side.

System_CAPS_pubproperty MessageWriterSettings

Gets the ODataMessageWriterSettings to be used while writing responses.

System_CAPS_pubproperty RequiredMemberSelector

Gets or sets the IRequiredMemberSelector instance used to determine required members.(Inherited from MediaTypeFormatter.)

System_CAPS_pubproperty SerializerProvider

Gets the ODataSerializerProvider that will be used by this formatter instance.

System_CAPS_pubproperty SupportedEncodings

Gets the mutable collection of character encodings supported bythis MediaTypeFormatter.(Inherited from MediaTypeFormatter.)

System_CAPS_pubproperty SupportedMediaTypes

Gets the mutable collection of media types supported bythis MediaTypeFormatter.(Inherited from MediaTypeFormatter.)

Methods

Name Description
System_CAPS_pubmethod CanReadType(Type)

(Overrides MediaTypeFormatter.CanReadType(Type).)

System_CAPS_pubmethod CanWriteType(Type)

(Overrides MediaTypeFormatter.CanWriteType(Type).)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetPerRequestFormatterInstance(Type, HttpRequestMessage, MediaTypeHeaderValue)

(Overrides MediaTypeFormatter.GetPerRequestFormatterInstance(Type, HttpRequestMessage, MediaTypeHeaderValue).)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger)

(Overrides MediaTypeFormatter.ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger).)

System_CAPS_pubmethod ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger, CancellationToken)

Asynchronously deserializes an object of the specified type.(Inherited from MediaTypeFormatter.)

System_CAPS_pubmethod SelectCharacterEncoding(HttpContentHeaders)

Determines the best character encoding for reading or writing an HTTP entity body, given a set of content headers.(Inherited from MediaTypeFormatter.)

System_CAPS_pubmethod SetDefaultContentHeaders(Type, HttpContentHeaders, MediaTypeHeaderValue)

(Overrides MediaTypeFormatter.SetDefaultContentHeaders(Type, HttpContentHeaders, MediaTypeHeaderValue).)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext)

Asynchronously writes an object of the specified type.(Inherited from MediaTypeFormatter.)

System_CAPS_pubmethod WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext, CancellationToken)

(Overrides MediaTypeFormatter.WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext, CancellationToken).)

Extension Methods

Name Description
System_CAPS_pubmethod AddQueryStringMapping(String, String, MediaTypeHeaderValue)

Overloaded. (Defined by MediaTypeFormatterExtensions.)

System_CAPS_pubmethod AddQueryStringMapping(String, String, String)

Overloaded. (Defined by MediaTypeFormatterExtensions.)

System_CAPS_pubmethod AddRequestHeaderMapping(String, String, StringComparison, Boolean, MediaTypeHeaderValue)

Overloaded. (Defined by MediaTypeFormatterExtensions.)

System_CAPS_pubmethod AddRequestHeaderMapping(String, String, StringComparison, Boolean, String)

Overloaded. (Defined by MediaTypeFormatterExtensions.)

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.

See Also

System.Web.OData.Formatter Namespace

Return to top