Partager via


IHttpRoute.GetRouteData Method

Determine whether this route is a match for the incoming request by looking up the <see cref="!:IRouteData" /> for the route.

Namespace:  System.Web.Http.Routing
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Function GetRouteData ( _
    virtualPathRoot As String, _
    request As HttpRequestMessage _
) As IHttpRouteData
'Usage
Dim instance As IHttpRoute
Dim virtualPathRoot As String
Dim request As HttpRequestMessage
Dim returnValue As IHttpRouteData

returnValue = instance.GetRouteData(virtualPathRoot, _
    request)
IHttpRouteData GetRouteData(
    string virtualPathRoot,
    HttpRequestMessage request
)
IHttpRouteData^ GetRouteData(
    String^ virtualPathRoot, 
    HttpRequestMessage^ request
)
abstract GetRouteData : 
        virtualPathRoot:string * 
        request:HttpRequestMessage -> IHttpRouteData 
function GetRouteData(
    virtualPathRoot : String, 
    request : HttpRequestMessage
) : IHttpRouteData

Parameters

  • request
    Type: HttpRequestMessage
    The request.

Return Value

Type: System.Web.Http.Routing.IHttpRouteData
The <see cref="!:RouteData" /> for a route if matches; otherwise null.

See Also

Reference

IHttpRoute Interface

System.Web.Http.Routing Namespace