DefaultContentNegotiator.MatchMediaTypeMapping Method
Matches a request against the MediaTypeMapping objects in a media-type formatter.
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
'Declaration
Protected Overridable Function MatchMediaTypeMapping ( _
request As HttpRequestMessage, _
formatter As MediaTypeFormatter _
) As MediaTypeFormatterMatch
'Usage
Dim request As HttpRequestMessage
Dim formatter As MediaTypeFormatter
Dim returnValue As MediaTypeFormatterMatch
returnValue = Me.MatchMediaTypeMapping(request, _
formatter)
protected virtual MediaTypeFormatterMatch MatchMediaTypeMapping(
HttpRequestMessage request,
MediaTypeFormatter formatter
)
protected:
virtual MediaTypeFormatterMatch^ MatchMediaTypeMapping(
HttpRequestMessage^ request,
MediaTypeFormatter^ formatter
)
abstract MatchMediaTypeMapping :
request:HttpRequestMessage *
formatter:MediaTypeFormatter -> MediaTypeFormatterMatch
override MatchMediaTypeMapping :
request:HttpRequestMessage *
formatter:MediaTypeFormatter -> MediaTypeFormatterMatch
protected function MatchMediaTypeMapping(
request : HttpRequestMessage,
formatter : MediaTypeFormatter
) : MediaTypeFormatterMatch
Parameters
request
Type: HttpRequestMessageThe requrst.
formatter
Type: System.Net.Http.Formatting.MediaTypeFormatterThe media-type formatter.
Return Value
Type: System.Net.Http.Formatting.MediaTypeFormatterMatch
Returns a MediaTypeFormatterMatch object that indicates the quality of the match, or null if there is no match.