VirtualPathData Class

Represents information about the route and virtual path that are the result of generating a URL with the ASP.NET routing middleware.

Namespace
Microsoft.AspNetCore.Routing
Assemblies
  • Microsoft.AspNetCore.Routing.Abstractions

Syntax

public class VirtualPathData
class Microsoft.AspNetCore.Routing.VirtualPathData

Constructors

VirtualPathData(Microsoft.AspNetCore.Routing.IRouter, System.String)
Initializes a new instance of the Microsoft.AspNetCore.Routing.VirtualPathData class.
Arguments:
public VirtualPathData(IRouter router, string virtualPath)
VirtualPathData(Microsoft.AspNetCore.Routing.IRouter, System.String, Microsoft.AspNetCore.Routing.RouteValueDictionary)
Initializes a new instance of the Microsoft.AspNetCore.Routing.VirtualPathData class.
Arguments:
public VirtualPathData(IRouter router, string virtualPath, RouteValueDictionary dataTokens)

Properties

Microsoft.AspNetCore.Routing.VirtualPathData.DataTokens

Gets the collection of custom values for the Microsoft.AspNetCore.Routing.VirtualPathData.Router.

Return type:Microsoft.AspNetCore.Routing.RouteValueDictionary
public RouteValueDictionary DataTokens { get; }
Microsoft.AspNetCore.Routing.VirtualPathData.Router

Gets or sets the Microsoft.AspNetCore.Routing.IRouter that was used to generate the URL.

Return type:Microsoft.AspNetCore.Routing.IRouter
public IRouter Router { get; set; }
Microsoft.AspNetCore.Routing.VirtualPathData.VirtualPath

Gets or sets the URL that was generated from the Microsoft.AspNetCore.Routing.VirtualPathData.Router.

Return type:System.String
public string VirtualPath { get; set; }