Share via


MediaTypeMapping Constructor ()

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

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

Syntax

'Declaration
Protected Sub New ( _
    mediaType As MediaTypeHeaderValue _
)
'Usage
Dim mediaType As MediaTypeHeaderValue

Dim instance As New MediaTypeMapping(mediaType)
protected MediaTypeMapping(
    MediaTypeHeaderValue mediaType
)
protected:
MediaTypeMapping(
    MediaTypeHeaderValue^ mediaType
)
new : 
        mediaType:MediaTypeHeaderValue -> MediaTypeMapping
protected function MediaTypeMapping(
    mediaType : MediaTypeHeaderValue
)

Parameters

  • mediaType
    Type: MediaTypeHeaderValue
    The MediaTypeHeaderValue that is associated with HttpRequestMessage or HttpResponseMessage instances that have the given characteristics of the MediaTypeMapping.

See Also

Reference

MediaTypeMapping Class

MediaTypeMapping Overload

System.Net.Http.Formatting Namespace