13 instantiations of VirtualPathContext
Microsoft.AspNetCore.Mvc.Core (1)
Routing\UrlHelper.cs (1)
86var context = new VirtualPathContext(HttpContext, AmbientValues, values, routeName);
Microsoft.AspNetCore.Mvc.Core.Test (1)
Infrastructure\ActionSelectorTest.cs (1)
1091return new VirtualPathContext(
Microsoft.AspNetCore.Routing.Microbenchmarks (4)
LinkGeneration\LinkGenerationGithubBenchmark.cs (1)
56var virtualPathData = _treeRouter.GetVirtualPath(new VirtualPathContext(
LinkGeneration\SingleRouteWithConstraintsBenchmark.cs (1)
40var virtualPathData = _treeRouter.GetVirtualPath(new VirtualPathContext(
LinkGeneration\SingleRouteWithNoParametersBenchmark.cs (1)
40var virtualPathData = _treeRouter.GetVirtualPath(new VirtualPathContext(
LinkGeneration\SingleRouteWithParametersBenchmark.cs (1)
40var virtualPathData = _treeRouter.GetVirtualPath(new VirtualPathContext(
Microsoft.AspNetCore.Routing.Tests (7)
RouteCollectionTest.cs (2)
612return new VirtualPathContext(context.Object, null, null, routeName); 634return new VirtualPathContext(
RouteTest.cs (3)
664var context = new VirtualPathContext( 1525return new VirtualPathContext(context, ambientValues, values); 1530return new VirtualPathContext(null, null, null, routeName);
Tree\LinkGenerationDecisionTreeTest.cs (1)
757var context = new VirtualPathContext(
Tree\TreeRouterTest.cs (1)
2007return new VirtualPathContext(
175 references to VirtualPathContext
Microsoft.AspNetCore.Mvc.Core (6)
Routing\AttributeRoute.cs (2)
38public VirtualPathData GetVirtualPath(VirtualPathContext context) 292public VirtualPathData? GetVirtualPath(VirtualPathContext context)
Routing\MvcAttributeRouteHandler.cs (1)
34public VirtualPathData? GetVirtualPath(VirtualPathContext context)
Routing\MvcRouteHandler.cs (1)
31public VirtualPathData? GetVirtualPath(VirtualPathContext context)
Routing\NullRouter.cs (1)
16public VirtualPathData? GetVirtualPath(VirtualPathContext context)
Routing\UrlHelper.cs (1)
86var context = new VirtualPathContext(HttpContext, AmbientValues, values, routeName);
Microsoft.AspNetCore.Mvc.Core.Test (6)
Infrastructure\ActionSelectorTest.cs (2)
1084private static VirtualPathContext CreateContext(object routeValues) 1089private static VirtualPathContext CreateContext(object routeValues, object ambientValues)
Routing\UrlHelperTest.cs (4)
97.Setup(router => router.GetVirtualPath(It.IsAny<VirtualPathContext>())) 98.Returns<VirtualPathContext>(context => null); 118.Setup(mock => mock.GetVirtualPath(It.Is<VirtualPathContext>(c => string.Equals(c.RouteName, mockRouteName)))) 140public VirtualPathData GetVirtualPath(VirtualPathContext context)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
RemoteAttributeTest.cs (1)
457.Setup(router => router.GetVirtualPath(It.IsAny<VirtualPathContext>()))
Microsoft.AspNetCore.Routing (11)
NullRouter.cs (1)
14public VirtualPathData? GetVirtualPath(VirtualPathContext context)
Route.cs (1)
99protected override VirtualPathData? OnVirtualPathGenerated(VirtualPathContext context)
RouteBase.cs (3)
101/// <param name="context">A <see cref="VirtualPathContext"/> instance.</param> 103protected abstract VirtualPathData? OnVirtualPathGenerated(VirtualPathContext context); 144public virtual VirtualPathData? GetVirtualPath(VirtualPathContext context)
RouteCollection.cs (2)
97public virtual VirtualPathData? GetVirtualPath(VirtualPathContext context) 127private static VirtualPathData? GetVirtualPath(VirtualPathContext context, List<IRouter> routes)
RouteHandler.cs (1)
33public VirtualPathData? GetVirtualPath(VirtualPathContext context)
Tree\TreeRouter.cs (3)
138public VirtualPathData GetVirtualPath(VirtualPathContext context) 266private VirtualPathData GetVirtualPathForNamedRoute(VirtualPathContext context) 280VirtualPathContext context,
Microsoft.AspNetCore.Routing.Abstractions (4)
IRouter.cs (2)
20/// <param name="context">A <see cref="VirtualPathContext"/> instance.</param> 22VirtualPathData? GetVirtualPath(VirtualPathContext context);
VirtualPathContext.cs (2)
14/// Creates a new instance of <see cref="VirtualPathContext"/>. 28/// Creates a new instance of <see cref="VirtualPathContext"/>.
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
90public VirtualPathData GetVirtualPath(VirtualPathContext context)
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (1)
92public VirtualPathData GetVirtualPath(VirtualPathContext context)
Microsoft.AspNetCore.Routing.Tests (145)
Matching\RouteMatcherBuilder.cs (1)
90public VirtualPathData GetVirtualPath(VirtualPathContext context)
Matching\TreeRouterMatcherBuilder.cs (1)
92public VirtualPathData GetVirtualPath(VirtualPathContext context)
RouteCollectionTest.cs (25)
38.Setup(e => e.GetVirtualPath(It.IsAny<VirtualPathContext>())) 43var virtualPathContext = CreateVirtualPathContext( 69.Setup(e => e.GetVirtualPath(It.IsAny<VirtualPathContext>())) 74var virtualPathContext = CreateVirtualPathContext(options: GetRouteOptions(lowercaseUrls)); 103.Setup(e => e.GetVirtualPath(It.IsAny<VirtualPathContext>())) 108var virtualPathContext = CreateVirtualPathContext( 132var pathContext = CreateVirtualPathContext( 243var virtualPathContext = CreateVirtualPathContext( 262var virtualPathContext = CreateVirtualPathContext("NonExistantRoute"); 279var virtualPathContext = CreateVirtualPathContext(routeName: "Route1", options: GetRouteOptions(true)); 300var virtualPathContext = CreateVirtualPathContext(routeName: ambiguousRoute, options: GetRouteOptions()); 322var virtualPathContext = CreateVirtualPathContext("Ambiguous"); 387var context = CreateVirtualPathContext(values, options: GetRouteOptions(lowercaseUrls)); 442var context = CreateVirtualPathContext(routeValues); 466var virtualPathContext = CreateVirtualPathContext(); 474route1.Verify(r => r.GetVirtualPath(It.IsAny<VirtualPathContext>()), Times.Once()); 475route2.Verify(r => r.GetVirtualPath(It.IsAny<VirtualPathContext>()), Times.Once()); 476route3.Verify(r => r.GetVirtualPath(It.IsAny<VirtualPathContext>()), Times.Once()); 544.Setup(e => e.GetVirtualPath(It.IsAny<VirtualPathContext>())) 545.Returns<VirtualPathContext>(c => 570.Setup(e => e.GetVirtualPath(It.IsAny<VirtualPathContext>())) 571.Returns<VirtualPathContext>(rc => null); 588private static VirtualPathContext CreateVirtualPathContext( 615private static VirtualPathContext CreateVirtualPathContext( 679.Setup(e => e.GetVirtualPath(It.IsAny<VirtualPathContext>()))
RouterMiddlewareTest.cs (1)
135public VirtualPathData GetVirtualPath(VirtualPathContext context)
RouteTest.cs (48)
604var context = CreateVirtualPathContext(new { controller = "Home" }); 620var context = CreateVirtualPathContext(new { controller = "Home" }); 634var context = CreateVirtualPathContext( 664var context = new VirtualPathContext( 685var context = CreateVirtualPathContext( 703var context = CreateVirtualPathContext( 721var context = CreateVirtualPathContext( 739var context = CreateVirtualPathContext( 762.Setup(r => r.GetVirtualPath(It.IsAny<VirtualPathContext>())) 773var context = CreateVirtualPathContext(new { controller = path }); 806.Setup(r => r.GetVirtualPath(It.IsAny<VirtualPathContext>())) 814var context = CreateVirtualPathContext(new { controller = path }); 840var context = CreateVirtualPathContext(new { controller = "Home" }); 856var context = CreateVirtualPathContext(new { action = "Index" }, new { controller = "Home" }); 871var context = CreateVirtualPathContext(new { p1 = "abcd" }); 890var context = CreateVirtualPathContext(new { p1 = "hello", p2 = "1234" }); 912var context = CreateVirtualPathContext(new { p1 = "abcd" }); 931var context = CreateVirtualPathContext(new { p1 = "hello", p2 = "1234" }); 953var context = CreateVirtualPathContext(new { p1 = "hello", p2 = "1234" }); 998var context = CreateVirtualPathContext( 1029var context = CreateVirtualPathContext( 1059var context = CreateVirtualPathContext( 1090var context = CreateVirtualPathContext( 1113var context = CreateVirtualPathContext( 1130var context = CreateVirtualPathContext( 1145var context = CreateVirtualPathContext( 1162var context = CreateVirtualPathContext( 1179var context = CreateVirtualPathContext( 1194var context = CreateVirtualPathContext( 1217var context = CreateVirtualPathContext( 1239var context = CreateVirtualPathContext( 1261var context = CreateVirtualPathContext( 1283var context = CreateVirtualPathContext( 1305var context = CreateVirtualPathContext( 1327var context = CreateVirtualPathContext( 1349var context = CreateVirtualPathContext( 1371var context = CreateVirtualPathContext( 1393var context = CreateVirtualPathContext( 1415var context = CreateVirtualPathContext( 1439var context = CreateVirtualPathContext( 1463var context = CreateVirtualPathContext( 1487var context = CreateVirtualPathContext( 1501private static VirtualPathContext CreateVirtualPathContext(object values) 1506private static VirtualPathContext CreateVirtualPathContext(object values, object ambientValues) 1511private static VirtualPathContext CreateVirtualPathContext( 1528private static VirtualPathContext CreateVirtualPathContext(string routeName) 1837.Setup(e => e.GetVirtualPath(It.IsAny<VirtualPathContext>())) 1838.Returns<VirtualPathContext>(rc => null);
Tree\LinkGenerationDecisionTreeTest.cs (30)
23var context = CreateContext(new { }); 43var context = CreateContext(new { }); 63var context = CreateContext(new { controller = "Store", action = "Buy" }); 83var context = CreateContext(values: null, ambientValues: new { controller = "Store", action = "Buy" }); 105var context = CreateContext( 129var context = CreateContext( 153var context = CreateContext(new { controller = "Store", action = "AddToCart" }); 173var context = CreateContext( 198var context = CreateContext( 224var context = CreateContext( 250var context = CreateContext(new { controller = "Store", action = "Buy", slug = "1234" }); 277var context = CreateContext(new { controller = "Store", action = "Buy" }); 303var context = CreateContext(new { controller = "Store", action = "Buy" }); 329var context = CreateContext(new { controller = "Store", action = "Buy" }); 354var context = CreateContext(new { controller = "Store", action = "Buy", area = "Admin" }); 382var context = CreateContext(new { controller = "Store", }, new { action = "Buy", area = "Admin", }); 410var context = CreateContext(new { }, new { controller = "Store", action = "Buy", area = "Admin", }); 438var context = CreateContext(new { page = "/Store/Buy", area = "Admin" }); 465var context = CreateContext(new { page = "/Store/Buy", }, new { area = "Admin", }); 493var context = CreateContext(new { }, new { page = "/Store/Buy", area = "Admin", }); 521var context = CreateContext(new { controller = "Home", action = "Index", }, new { page = "/Store/Buy", }); 548var context = CreateContext(new { controller = "Home", action = "Index", }, new { page = "/Store/Buy", area = "Admin", }); 575var context = CreateContext(new { controller = "Home", action = "Index", page = "16", }, new { page = "/Store/Buy", }); 600var context = CreateContext(new { controller = "Home", action = "Index", page = "/Store/Buy", }, new { page = "/Store/Buy", }); 625var context = CreateContext(new { page = "/Store/Buy", }, new { controller = "Home", action = "Index", }); 652var context = CreateContext(new { page = "/Store/Buy", }, new { controller = "Home", action = "Index", area = "Admin", }); 679var context = CreateContext(new { page = "/Store/Buy", action = "buy", }, new { controller = "Home", action = "Index", page = "16", }); 704var context = CreateContext(new { page = "/Store/Buy", action = "Index", }, new { controller = "Home", action = "Index", page = "16", }); 755private VirtualPathContext CreateContext(object values, object ambientValues = null) 757var context = new VirtualPathContext(
Tree\TreeRouterTest.cs (39)
811var context = CreateVirtualPathContext( 833var context = CreateVirtualPathContext( 866var context = CreateVirtualPathContext( 898var context = CreateVirtualPathContext( 935var context = CreateVirtualPathContext(values: null, ambientValues: new { parameter = 5 }); 967VirtualPathContext context; 1018var context = CreateVirtualPathContext(null, ambientValues: new { parameter = 5 }); 1048var context = CreateVirtualPathContext(values: null, ambientValues: new { first = 5, second = 5 }); 1078var context = CreateVirtualPathContext(values: null, ambientValues: new { first = 5, second = 5 }); 1100var context = CreateVirtualPathContext(values: null, ambientValues: null); 1136var context = CreateVirtualPathContext(values: null, ambientValues: null, name: "NamedRoute"); 1163var context = CreateVirtualPathContext(values: null, ambientValues: null, name: "NonExistingNamedRoute"); 1193var context = CreateVirtualPathContext(values: null, ambientValues: ambientValues, name: "NamedRoute"); 1222var context = CreateVirtualPathContext(values: null, ambientValues: ambientValues, name: "NamedRoute"); 1242var context = CreateVirtualPathContext(new { }); 1262var context = CreateVirtualPathContext(new { action = "Index", controller = "Store" }); 1282var context = CreateVirtualPathContext(new { action = "Index", controller = "Store" }); 1299var context = CreateVirtualPathContext(new { }, new { action = "Index", controller = "Store" }); 1319var context = CreateVirtualPathContext(new { page = "/Customers/SeparatePageModels/Index" }, new { page = "/Customers/SeparatePageModels/Edit", id = "17" }); 1339var context = CreateVirtualPathContext(new { action = "Index", controller = "Store" }); 1362var context = CreateVirtualPathContext( 1384var context = CreateVirtualPathContext(new { action = "Index", controller = "Store" }); 1405var context = CreateVirtualPathContext(new { action = "Index", controller = "Store", id = 5 }); 1426var context = CreateVirtualPathContext(new { action = "Index", controller = "Store", id = "heyyyy" }); 1443var context = CreateVirtualPathContext(new { action = "Index" }, new { controller = "Store" }); 1463var context = CreateVirtualPathContext(new { action = "Index", id = 5 }, new { controller = "Store" }); 1485var context = CreateVirtualPathContext(new { action = "Index", controller = "Blog" }); 1510var context = CreateVirtualPathContext(new { area = "Help", action = "Edit", controller = "Store" }); 1535var context = CreateVirtualPathContext(new { area = "Help", action = "Edit", controller = "Store" }); 1560var context = CreateVirtualPathContext( 1587var context = CreateVirtualPathContext( 1683var context = CreateVirtualPathContext(values, ambientValues); 1906var context = CreateVirtualPathContext(new { area = (string)null, action = "Edit", controller = "Store" }); 1928var context = CreateVirtualPathContext(new { area = "", action = "Edit", controller = "Store" }); 1950var context = CreateVirtualPathContext(new { foo = (string)null, action = "Edit", controller = "Store" }); 1972var context = CreateVirtualPathContext(new { foo = "", action = "Edit", controller = "Store" }); 1998private static VirtualPathContext CreateVirtualPathContext( 2095public VirtualPathContext GenerationContext { get; set; } 2101public VirtualPathData GetVirtualPath(VirtualPathContext context)