Compartilhar via


UriPathExtensionMapping.TryMatchMediaType Method

Returns a value indicating whether this UriPathExtensionMapping instance can provide a MediaTypeHeaderValue for the Uri of request.

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

Syntax

'Declaration
Public Overrides Function TryMatchMediaType ( _
    request As HttpRequestMessage _
) As Double
'Usage
Dim instance As UriPathExtensionMapping 
Dim request As HttpRequestMessage 
Dim returnValue As Double 

returnValue = instance.TryMatchMediaType(request)
public override double TryMatchMediaType(
    HttpRequestMessage request
)
public:
virtual double TryMatchMediaType(
    HttpRequestMessage^ request
) override
abstract TryMatchMediaType : 
        request:HttpRequestMessage -> float  
override TryMatchMediaType : 
        request:HttpRequestMessage -> float
public override function TryMatchMediaType(
    request : HttpRequestMessage
) : double

Parameters

Return Value

Type: System.Double
If this instance can match a file extension in request it returns 1.0 otherwise 0.0.

See Also

Reference

UriPathExtensionMapping Class

System.Net.Http.Formatting Namespace