MediaTypeMapping.TryMatchMediaType Method
Returns the quality of the match of the MediaTypeHeaderValue associated with request.
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
'Declaration
Public MustOverride Function TryMatchMediaType ( _
request As HttpRequestMessage _
) As Double
'Usage
Dim instance As MediaTypeMapping
Dim request As HttpRequestMessage
Dim returnValue As Double
returnValue = instance.TryMatchMediaType(request)
public abstract double TryMatchMediaType(
HttpRequestMessage request
)
public:
virtual double TryMatchMediaType(
HttpRequestMessage^ request
) abstract
abstract TryMatchMediaType :
request:HttpRequestMessage -> float
public abstract function TryMatchMediaType(
request : HttpRequestMessage
) : double
Parameters
- request
Type: HttpRequestMessage
The HttpRequestMessage to evaluate for the characteristics associated with the MediaTypeHeaderValue of the MediaTypeMapping.
Return Value
Type: System.Double
The quality of the match. It must be between 0.0 and 1.0. A value of 0.0 signifies no match. A value of 1.0 signifies a complete match.