Partager via


HttpRoute.GetVirtualPath Method

Attempts to generate a URI that represents the values passed in based on current values from the HttpRouteData and new values using the specified HttpRoute.

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

Syntax

'Declaration
Public Overridable Function GetVirtualPath ( _
    request As HttpRequestMessage, _
    values As IDictionary(Of String, Object) _
) As IHttpVirtualPathData
'Usage
Dim instance As HttpRoute 
Dim request As HttpRequestMessage 
Dim values As IDictionary(Of String, Object)
Dim returnValue As IHttpVirtualPathData 

returnValue = instance.GetVirtualPath(request, _
    values)
public virtual IHttpVirtualPathData GetVirtualPath(
    HttpRequestMessage request,
    IDictionary<string, Object> values
)
public:
virtual IHttpVirtualPathData^ GetVirtualPath(
    HttpRequestMessage^ request, 
    IDictionary<String^, Object^>^ values
)
abstract GetVirtualPath : 
        request:HttpRequestMessage * 
        values:IDictionary<string, Object> -> IHttpVirtualPathData  
override GetVirtualPath : 
        request:HttpRequestMessage * 
        values:IDictionary<string, Object> -> IHttpVirtualPathData
public function GetVirtualPath(
    request : HttpRequestMessage, 
    values : IDictionary<String, Object>
) : IHttpVirtualPathData

Parameters

  • request
    Type: HttpRequestMessage

    The HTTP request message.

Return Value

Type: System.Web.Http.Routing.IHttpVirtualPathData
A HttpVirtualPathData instance or null if URI cannot be generated.

Implements

IHttpRoute.GetVirtualPath(HttpRequestMessage, IDictionary<String, Object>)

See Also

Reference

HttpRoute Class

System.Web.Http.Routing Namespace