C# Class MvcApi.Formatting.MediaTypeHeaderValueExtensions

Extension methods for MediaTypeHeaderValue.
Mostra file Open project: dax70/MvcApi

Public Methods

Method Description
IsSubsetOf ( this mediaType1, MediaTypeHeaderValue mediaType2 ) : bool

Determines whether two MediaTypeHeaderValue instances match. The instance mediaType1 is said to match mediaType2 if and only if mediaType1 is a strict subset of the values and parameters of mediaType2. That is, if the media type and media type parameters of mediaType1 are all present and match those of mediaType2 then it is a match even though mediaType2 may have additional parameters.

IsSubsetOf ( this mediaType1, MediaTypeHeaderValue mediaType2, MediaTypeHeaderValueRange &mediaType2Range ) : bool

Determines whether two MediaTypeHeaderValue instances match. The instance mediaType1 is said to match mediaType2 if and only if mediaType1 is a strict subset of the values and parameters of mediaType2. That is, if the media type and media type parameters of mediaType1 are all present and match those of mediaType2 then it is a match even though mediaType2 may have additional parameters.

Method Details

IsSubsetOf() public static method

Determines whether two MediaTypeHeaderValue instances match. The instance mediaType1 is said to match mediaType2 if and only if mediaType1 is a strict subset of the values and parameters of mediaType2. That is, if the media type and media type parameters of mediaType1 are all present and match those of mediaType2 then it is a match even though mediaType2 may have additional parameters.
public static IsSubsetOf ( this mediaType1, MediaTypeHeaderValue mediaType2 ) : bool
mediaType1 this The first media type.
mediaType2 System.Net.Http.Headers.MediaTypeHeaderValue The second media type.
return bool

IsSubsetOf() public static method

Determines whether two MediaTypeHeaderValue instances match. The instance mediaType1 is said to match mediaType2 if and only if mediaType1 is a strict subset of the values and parameters of mediaType2. That is, if the media type and media type parameters of mediaType1 are all present and match those of mediaType2 then it is a match even though mediaType2 may have additional parameters.
public static IsSubsetOf ( this mediaType1, MediaTypeHeaderValue mediaType2, MediaTypeHeaderValueRange &mediaType2Range ) : bool
mediaType1 this The first media type.
mediaType2 System.Net.Http.Headers.MediaTypeHeaderValue The second media type.
mediaType2Range MediaTypeHeaderValueRange Indicates whether is a regular media type, a subtype media range, or a full media range
return bool