MediaTypeMapping Class

 

An abstract base class used to create an association between HttpRequestMessage or HttpResponseMessage instances that have certain characteristics and a specific MediaTypeHeaderValue.

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

Inheritance Hierarchy

System.Object
  System.Net.Http.Formatting.MediaTypeMapping
    System.Net.Http.Formatting.QueryStringMapping
    System.Net.Http.Formatting.RequestHeaderMapping
    System.Web.Http.OData.Formatter.ODataRawValueMediaTypeMapping
    System.Web.OData.Formatter.ODataCountMediaTypeMapping
    System.Web.OData.Formatter.ODataRawValueMediaTypeMapping
    System.Web.OData.Formatter.QueryStringMediaTypeMapping

Syntax

public abstract class MediaTypeMapping
public ref class MediaTypeMapping abstract 
[<AbstractClass>]
type MediaTypeMapping = class end
Public MustInherit Class MediaTypeMapping

Constructors

Name Description
System_CAPS_protmethod MediaTypeMapping(MediaTypeHeaderValue)

Initializes a new instance of a MediaTypeMapping with the given mediaType value.

System_CAPS_protmethod MediaTypeMapping(String)

Initializes a new instance of a MediaTypeMapping with the given mediaType value.

Properties

Name Description
System_CAPS_pubproperty MediaType

Gets the MediaTypeHeaderValue that is associated with HttpRequestMessage or HttpResponseMessage instances that have the given characteristics of the MediaTypeMapping.

Methods

Name Description
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 GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod TryMatchMediaType(HttpRequestMessage)

Returns the quality of the match of the MediaTypeHeaderValue associated with request.

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.Net.Http.Formatting Namespace

Return to top