C# Class MvcApi.Formatting.MediaRangeMapping

Class that provides T:System.Net.Http.Headers.MediaTypeHeaderValues for a request or response from a media range.
Inheritance: MediaTypeMapping
ファイルを表示 Open project: dax70/MvcApi

Public Methods

Method Description
MediaRangeMapping ( MediaTypeHeaderValue mediaRange, MediaTypeHeaderValue mediaType ) : System

Initializes a new instance of the T:System.Net.Http.Formatting.MediaRangeMapping class.

MediaRangeMapping ( string mediaRange, string mediaType ) : System

Initializes a new instance of the T:System.Net.Http.Formatting.MediaRangeMapping class.

Protected Methods

Method Description
OnTryMatchMediaType ( HttpRequestMessage request ) : double
OnTryMatchMediaType ( HttpResponseMessage response ) : double

Private Methods

Method Description
Initialize ( MediaTypeHeaderValue mediaRange ) : void

Method Details

MediaRangeMapping() public method

Initializes a new instance of the T:System.Net.Http.Formatting.MediaRangeMapping class.
public MediaRangeMapping ( MediaTypeHeaderValue mediaRange, MediaTypeHeaderValue mediaType ) : System
mediaRange System.Net.Http.Headers.MediaTypeHeaderValue The that provides a description of the media range.
mediaType System.Net.Http.Headers.MediaTypeHeaderValue The to return on a match.
return System

MediaRangeMapping() public method

Initializes a new instance of the T:System.Net.Http.Formatting.MediaRangeMapping class.
public MediaRangeMapping ( string mediaRange, string mediaType ) : System
mediaRange string The description of the media range.
mediaType string The media type to return on a match.
return System

OnTryMatchMediaType() protected final method

protected final OnTryMatchMediaType ( HttpRequestMessage request ) : double
request MvcApi.Http.HttpRequestMessage
return double

OnTryMatchMediaType() protected final method

protected final OnTryMatchMediaType ( HttpResponseMessage response ) : double
response MvcApi.Http.HttpResponseMessage
return double