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