26 instantiations of RouteContext
Microsoft.AspNetCore.Mvc.Core (1)
Routing\ActionConstraintMatcherPolicy.cs (1)
231constraintContext.RouteContext = new RouteContext(httpContext)
Microsoft.AspNetCore.Mvc.Core.Test (15)
ActionConstraints\HttpMethodActionConstraintTest.cs (1)
80var routeContext = new RouteContext(httpContext);
ConsumesAttributeTests.cs (1)
407var routeContext = new RouteContext(httpContext);
Infrastructure\ActionSelectorTest.cs (6)
856var routeContext = new RouteContext(GetHttpContext(verb)); 877var routeContext = new RouteContext(GetHttpContext(verb)); 895var routeContext = new RouteContext(GetHttpContext(verb)); 932var routeContext = new RouteContext(GetHttpContext(verb)); 962var routeContext = new RouteContext(GetHttpContext(verb)); 1113return new RouteContext(httpContext.Object)
Routing\AttributeRouteTest.cs (2)
84var context = new RouteContext(httpContext); 101context = new RouteContext(httpContext);
Routing\AttributeRoutingTest.cs (4)
40var routeContext = new RouteContext(new DefaultHttpContext()); 69await route.RouteAsync(new RouteContext(new DefaultHttpContext())); 103await route.RouteAsync(new RouteContext(new DefaultHttpContext())); 141await route.RouteAsync(new RouteContext(new DefaultHttpContext()));
Routing\MvcRouteHandlerTests.cs (1)
115var routeContext = new RouteContext(httpContext.Object);
Microsoft.AspNetCore.Mvc.Cors.Test (1)
CorsHttpMethodActionConstraintTest.cs (1)
99var routeContext = new RouteContext(httpContext);
Microsoft.AspNetCore.Routing (1)
RouterMiddleware.cs (1)
43var context = new RouteContext(httpContext);
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
src\Http\Routing\test\UnitTests\Matching\RouteMatcher.cs (1)
22var routeContext = new RouteContext(httpContext);
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcher.cs (1)
23var routeContext = new RouteContext(httpContext);
Microsoft.AspNetCore.Routing.Tests (6)
Matching\RouteMatcher.cs (1)
22var routeContext = new RouteContext(httpContext);
Matching\TreeRouterMatcher.cs (1)
23var routeContext = new RouteContext(httpContext);
RequestDelegateRouteBuilderExtensionsTest.cs (1)
136return new RouteContext(httpContext);
RouteCollectionTest.cs (1)
669return new RouteContext(context.Object);
RouteTest.cs (1)
596return new RouteContext(context.Object);
Tree\TreeRouterTest.cs (1)
1995return new RouteContext(context.Object);
185 references to RouteContext
Microsoft.AspNetCore.Mvc.Abstractions (1)
ActionConstraints\ActionConstraintContext.cs (1)
27public RouteContext RouteContext { get; set; } = default!;
Microsoft.AspNetCore.Mvc.Core (14)
ActionConstraints\ActionMethodSelectorAttribute.cs (1)
34public abstract bool IsValidForRequest(RouteContext routeContext, ActionDescriptor action);
Infrastructure\ActionSelector.cs (4)
63public IReadOnlyList<ActionDescriptor> SelectCandidates(RouteContext context) 79public ActionDescriptor? SelectBestCandidate(RouteContext context, IReadOnlyList<ActionDescriptor> candidates) 112RouteContext context, 145RouteContext context,
Infrastructure\IActionSelector.cs (4)
20/// <param name="context">The <see cref="RouteContext"/> associated with the current request.</param> 31IReadOnlyList<ActionDescriptor>? SelectCandidates(RouteContext context); 37/// <param name="context">The <see cref="RouteContext"/> associated with the current request.</param> 55ActionDescriptor? SelectBestCandidate(RouteContext context, IReadOnlyList<ActionDescriptor> candidates);
Routing\AttributeRoute.cs (2)
45public Task RouteAsync(RouteContext context) 297public Task RouteAsync(RouteContext context)
Routing\MvcAttributeRouteHandler.cs (1)
42public Task RouteAsync(RouteContext context)
Routing\MvcRouteHandler.cs (1)
39public Task RouteAsync(RouteContext context)
Routing\NullRouter.cs (1)
21public Task RouteAsync(RouteContext context)
Microsoft.AspNetCore.Mvc.Core.Test (47)
ActionConstraints\HttpMethodActionConstraintTest.cs (2)
68private static RouteContext CreateRouteContext(string requestedMethod, string accessControlMethod = null) 80var routeContext = new RouteContext(httpContext);
ConsumesAttributeTests.cs (2)
403private static RouteContext CreateRouteContext(string contentType = null, object routeValues = null) 407var routeContext = new RouteContext(httpContext);
Infrastructure\ActionSelectorTest.cs (30)
54var routeContext = CreateRouteContext("GET"); 94var routeContext = CreateRouteContext("GET"); 135var routeContext = CreateRouteContext("GET"); 173var routeContext = CreateRouteContext("GET"); 206var routeContext = CreateRouteContext("GET"); 258var routeContext = CreateRouteContext("GET"); 310var routeContext = CreateRouteContext("GET"); 340var routeContext = CreateRouteContext("GET"); 374var routeContext = CreateRouteContext("GET"); 408var routeContext = CreateRouteContext("GET"); 442var routeContext = CreateRouteContext("GET"); 476var routeContext = CreateRouteContext("GET"); 505var routeContext = CreateRouteContext("POST"); 540var context = CreateRouteContext("POST"); 572var context = CreateRouteContext("POST"); 606var context = CreateRouteContext("POST"); 638var context = CreateRouteContext("POST"); 664var context = CreateRouteContext("POST"); 694var context = CreateRouteContext("POST"); 727var context = CreateRouteContext("POST"); 764var context = CreateRouteContext("POST"); 802var context = CreateRouteContext("POST"); 832var context = CreateRouteContext("GET"); 856var routeContext = new RouteContext(GetHttpContext(verb)); 877var routeContext = new RouteContext(GetHttpContext(verb)); 895var routeContext = new RouteContext(GetHttpContext(verb)); 932var routeContext = new RouteContext(GetHttpContext(verb)); 962var routeContext = new RouteContext(GetHttpContext(verb)); 973private ControllerActionDescriptor InvokeActionSelector(RouteContext context) 1097private static RouteContext CreateRouteContext(string httpMethod)
Routing\AttributeRouteTest.cs (5)
52.Setup(r => r.RouteAsync(It.IsAny<RouteContext>())) 53.Returns<RouteContext>(routeContext => 84var context = new RouteContext(httpContext); 779.Setup(h => h.RouteAsync(It.IsAny<RouteContext>())) 780.Callback<RouteContext>(c => c.Handler = NullHandler)
Routing\AttributeRoutingTest.cs (1)
40var routeContext = new RouteContext(new DefaultHttpContext());
Routing\MvcRouteHandlerTests.cs (6)
27.Setup(a => a.SelectCandidates(It.IsAny<RouteContext>())) 30var context = CreateRouteContext(); 66.Setup(a => a.SelectCandidates(It.IsAny<RouteContext>())) 70.Setup(a => a.SelectBestCandidate(It.IsAny<RouteContext>(), It.IsAny<IReadOnlyList<ActionDescriptor>>())) 106private RouteContext CreateRouteContext() 115var routeContext = new RouteContext(httpContext.Object);
Routing\UrlHelperTest.cs (1)
145public Task RouteAsync(RouteContext context)
Microsoft.AspNetCore.Mvc.Cors.Test (2)
CorsHttpMethodActionConstraintTest.cs (2)
84private static RouteContext CreateRouteContext(string requestedMethod, string accessControlMethod = null) 99var routeContext = new RouteContext(httpContext);
Microsoft.AspNetCore.Routing (10)
NullRouter.cs (1)
19public Task RouteAsync(RouteContext context)
Route.cs (1)
92protected override Task OnRouteMatched(RouteContext context)
RouteBase.cs (3)
95/// <param name="context">A <see cref="RouteContext"/> instance.</param> 96protected abstract Task OnRouteMatched(RouteContext context); 106public virtual Task RouteAsync(RouteContext context)
RouteCollection.cs (1)
65public virtual async Task RouteAsync(RouteContext context)
RouteHandler.cs (1)
40public Task RouteAsync(RouteContext context)
RouterMiddleware.cs (2)
37/// Evaluates the handler associated with the <see cref="RouteContext"/> 43var context = new RouteContext(httpContext);
Tree\TreeRouter.cs (1)
171public async Task RouteAsync(RouteContext context)
Microsoft.AspNetCore.Routing.Abstractions (4)
IRouter.cs (2)
14/// <param name="context">A <see cref="RouteContext"/> instance.</param> 15Task RouteAsync(RouteContext context);
RouteContext.cs (2)
9/// A context object for <see cref="IRouter.RouteAsync(RouteContext)"/>. 16/// Creates a new instance of <see cref="RouteContext"/> for the provided <paramref name="httpContext"/>.
Microsoft.AspNetCore.Routing.Microbenchmarks (4)
src\Http\Routing\test\UnitTests\Matching\RouteMatcher.cs (1)
22var routeContext = new RouteContext(httpContext);
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
95public async Task RouteAsync(RouteContext routeContext)
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcher.cs (1)
23var routeContext = new RouteContext(httpContext);
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (1)
97public async Task RouteAsync(RouteContext routeContext)
Microsoft.AspNetCore.Routing.Tests (103)
Builder\RoutingBuilderExtensionsTest.cs (2)
79.Setup(r => r.RouteAsync(It.IsAny<RouteContext>())) 104.Setup(r => r.RouteAsync(It.IsAny<RouteContext>()))
Matching\RouteMatcher.cs (1)
22var routeContext = new RouteContext(httpContext);
Matching\RouteMatcherBuilder.cs (1)
95public async Task RouteAsync(RouteContext routeContext)
Matching\TreeRouterMatcher.cs (1)
23var routeContext = new RouteContext(httpContext);
Matching\TreeRouterMatcherBuilder.cs (1)
97public async Task RouteAsync(RouteContext routeContext)
RequestDelegateRouteBuilderExtensionsTest.cs (3)
50var context = CreateRouteContext(services); 108var context = CreateRouteContext(services); 132private static RouteContext CreateRouteContext(IServiceProvider services)
RouteCollectionTest.cs (14)
172var context = CreateRouteContext("/Cool"); 178route1.Verify(e => e.RouteAsync(It.IsAny<RouteContext>()), Times.Exactly(1)); 179route2.Verify(e => e.RouteAsync(It.IsAny<RouteContext>()), Times.Exactly(0)); 198var context = CreateRouteContext("/Cool"); 204route1.Verify(e => e.RouteAsync(It.IsAny<RouteContext>()), Times.Exactly(1)); 205route2.Verify(e => e.RouteAsync(It.IsAny<RouteContext>()), Times.Exactly(1)); 223var context = CreateRouteContext("/Cool"); 229route1.Verify(e => e.RouteAsync(It.IsAny<RouteContext>()), Times.Exactly(1)); 230route2.Verify(e => e.RouteAsync(It.IsAny<RouteContext>()), Times.Exactly(1)); 554.Setup(e => e.RouteAsync(It.IsAny<RouteContext>())) 555.Callback<RouteContext>((c) => c.Handler = accept ? NullHandler : null) 641private static RouteContext CreateRouteContext( 684.Setup(e => e.RouteAsync(It.IsAny<RouteContext>())) 685.Callback<RouteContext>((c) => c.Handler = accept ? NullHandler : null)
RouterMiddlewareTest.cs (1)
140public Task RouteAsync(RouteContext context)
RouteTest.cs (37)
57var context = CreateRouteContext("/Home/Index/5"); 68.Setup(s => s.RouteAsync(It.IsAny<RouteContext>())) 69.Callback<RouteContext>(ctx => 112var context = CreateRouteContext("/Home/Index/5"); 122.Setup(s => s.RouteAsync(It.IsAny<RouteContext>())) 123.Callback<RouteContext>(ctx => 171var context = CreateRouteContext("/Home/Index/5"); 176.Setup(s => s.RouteAsync(It.IsAny<RouteContext>())) 177.Callback<RouteContext>(ctx => 213var context = CreateRouteContext("/Home/Index/123-456-7890"); 218.Setup(s => s.RouteAsync(It.IsAny<RouteContext>())) 219.Callback<RouteContext>(ctx => 255var context = CreateRouteContext("/Home/Index"); 260.Setup(s => s.RouteAsync(It.IsAny<RouteContext>())) 261.Callback<RouteContext>(ctx => 295var context = CreateRouteContext("/Home/Index/5"); 300.Setup(s => s.RouteAsync(It.IsAny<RouteContext>())) 301.Callback<RouteContext>(ctx => 347var context = CreateRouteContext("/Home/Index/100"); 352.Setup(s => s.RouteAsync(It.IsAny<RouteContext>())) 353.Callback<RouteContext>(ctx => 384var context = CreateRouteContext("/Home/Index"); 401var context = CreateRouteContext("/"); 416var context = CreateRouteContext("/Home"); 437var context = CreateRouteContext("/Home"); 456var context = CreateRouteContext("/Home"); 470var context = CreateRouteContext("/Home"); 489var context = CreateRouteContext("/Home"); 505var context = CreateRouteContext("/Home/Index"); 519var context = CreateRouteContext("/Home/Create.xml"); 537var context = CreateRouteContext("/Home/Create"); 554var context = CreateRouteContext("/Home/Create"); 572var context = CreateRouteContext("/Home/Create."); 581private static RouteContext CreateRouteContext(string requestPath, ILoggerFactory factory = null) 1738var context = CreateRouteContext(url); 1841.Setup(e => e.RouteAsync(It.IsAny<RouteContext>())) 1842.Callback<RouteContext>((c) => c.Handler = handleRequest ? NullHandler : null)
Tree\TreeRouterTest.cs (42)
50var context = CreateRouteContext("/template/5"); 111var context = CreateRouteContext(url); 158var context = CreateRouteContext(url); 210var context = CreateRouteContext(url); 253var context = CreateRouteContext(url); 279var context = CreateRouteContext(url); 302var context = CreateRouteContext(url); 323var context = CreateRouteContext(url); 351var context = CreateRouteContext("/Literal1"); 388var context = CreateRouteContext("/template/5"); 413var context = CreateRouteContext(url); 440var context = CreateRouteContext(url); 467var context = CreateRouteContext(url); 488var context = CreateRouteContext(url); 509var context = CreateRouteContext(url); 534var context = CreateRouteContext(requestPath); 556var context = CreateRouteContext(requestPath); 578var context = CreateRouteContext(requestPath); 601var context = CreateRouteContext(requestPath); 632var context = CreateRouteContext("/template/5"); 660var context = CreateRouteContext("/template/5"); 686var context = CreateRouteContext(request); 736var context = CreateRouteContext(request); 781var context = CreateRouteContext(request); 1703var context = CreateRouteContext("/Foo/Bar"); 1723var context = CreateRouteContext("/Foo/"); 1744.Setup(r => r.RouteAsync(It.IsAny<RouteContext>())) 1745.Callback<RouteContext>(c => 1757var context = CreateRouteContext("/api/Store"); 1781.Setup(r => r.RouteAsync(It.IsAny<RouteContext>())) 1782.Callback<RouteContext>(c => 1794var context = CreateRouteContext("/api/Store"); 1825.Setup(r => r.RouteAsync(It.IsAny<RouteContext>())) 1826.Callback<RouteContext>(c => 1838var context = CreateRouteContext("/api/Store"); 1871.Setup(r => r.RouteAsync(It.IsAny<RouteContext>())) 1872.Callback<RouteContext>(c => 1884var context = CreateRouteContext("/cat_examplecategory/prod2_exampleproduct"); 1984private static RouteContext CreateRouteContext(string requestPath) 2097public RouteContext MatchingContext { get; set; } 2099public Func<RouteContext, bool> MatchingDelegate { get; set; } 2107public Task RouteAsync(RouteContext context)