2 interfaces inheriting from IRouter
Microsoft.AspNetCore.Routing (2)
INamedRouter.cs (1)
9public interface INamedRouter : IRouter
IRouteCollection.cs (1)
9public interface IRouteCollection : IRouter
16 implementations of IRouter
Microsoft.AspNetCore.Mvc.Core (5)
Routing\AttributeRoute.cs (2)
15internal sealed class AttributeRoute : IRouter 288private sealed class NullRouter : IRouter
Routing\MvcAttributeRouteHandler.cs (1)
13internal sealed class MvcAttributeRouteHandler : IRouter
Routing\MvcRouteHandler.cs (1)
12internal sealed class MvcRouteHandler : IRouter
Routing\NullRouter.cs (1)
8internal sealed class NullRouter : IRouter
Microsoft.AspNetCore.Mvc.Core.Test (1)
Routing\UrlHelperTest.cs (1)
138private class PassThroughRouter : IRouter
Microsoft.AspNetCore.Routing (4)
NullRouter.cs (1)
6internal sealed class NullRouter : IRouter
RouteBase.cs (1)
16public abstract partial class RouteBase : IRouter, INamedRouter
RouteHandler.cs (1)
13public class RouteHandler : IRouteHandler, IRouter
Tree\TreeRouter.cs (1)
22public partial class TreeRouter : IRouter
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
74private class SelectorRouter : IRouter
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (1)
76private class SelectorRouter : IRouter
Microsoft.AspNetCore.Routing.Tests (4)
Matching\RouteMatcherBuilder.cs (1)
74private class SelectorRouter : IRouter
Matching\TreeRouterMatcherBuilder.cs (1)
76private class SelectorRouter : IRouter
RouterMiddlewareTest.cs (1)
126private class TestRouter : IRouter
Tree\TreeRouterTest.cs (1)
2093private class StubRouter : IRouter
273 references to IRouter
Microsoft.AspNetCore.Mvc.Core (13)
ActionConstraints\HttpMethodActionConstraint.cs (1)
11/// HTTP method filtering when MVC is used with legacy <see cref="IRouter" />
Builder\MvcApplicationBuilderExtensions.cs (4)
96Routes = new List<IRouter>(); 102public IRouter? DefaultHandler { get; set; } 109public IList<IRouter> Routes { get; } 111public IRouter Build()
Routing\AttributeRoute.cs (3)
19private readonly Func<ActionDescriptor[], IRouter> _handlerFactory; 26Func<ActionDescriptor[], IRouter> handlerFactory) 113var handler = _handlerFactory(group.ToArray());
Routing\AttributeRouting.cs (1)
17public static IRouter CreateAttributeMegaRoute(IServiceProvider services)
Routing\KnownRouteValueConstraint.cs (1)
36IRouter? route,
Routing\NullRouter.cs (1)
10public static readonly IRouter Instance = new NullRouter();
Routing\UrlHelper.cs (2)
31/// Gets the top-level <see cref="IRouter"/> associated with the current request. Generally an 34protected IRouter Router
Microsoft.AspNetCore.Mvc.Core.Test (41)
AcceptedAtActionResultTests.cs (1)
240routeData.Routers.Add(Mock.Of<IRouter>());
AcceptedAtRouteResultTests.cs (1)
148routeData.Routers.Add(Mock.Of<IRouter>());
AcceptedResultTests.cs (1)
106routeData.Routers.Add(Mock.Of<IRouter>());
Builder\MvcAreaRouteBuilderExtensionsTest.cs (3)
252route: new Mock<IRouter>().Object, 285.Returns(new List<IRouter>()); 288.Returns(Mock.Of<IRouter>());
ChallengeResultTest.cs (2)
30routeData.Routers.Add(Mock.Of<IRouter>()); 55routeData.Routers.Add(Mock.Of<IRouter>());
ContentResultTest.cs (1)
249routeData.Routers.Add(Mock.Of<IRouter>());
CreatedAtActionResultTests.cs (1)
69routeData.Routers.Add(Mock.Of<IRouter>());
CreatedAtRouteResultTests.cs (1)
82routeData.Routers.Add(Mock.Of<IRouter>());
CreatedResultTests.cs (1)
115routeData.Routers.Add(Mock.Of<IRouter>());
Infrastructure\ActionSelectorTest.cs (1)
1100routeData.Routers.Add(new Mock<IRouter>(MockBehavior.Strict).Object);
LocalRedirectResultTest.cs (1)
131routeData.Routers.Add(new Mock<IRouter>().Object);
Routing\AttributeRouteTest.cs (6)
48Func<ActionDescriptor[], IRouter> handlerFactory = (_) => 50var handler = new Mock<IRouter>(); 775private static Mock<IRouter> CreateHandler() 777var handler = new Mock<IRouter>(MockBehavior.Strict); 798IRouter handler, 805Func<ActionDescriptor[], IRouter> handlerFactory,
Routing\AttributeRoutingTest.cs (4)
39var route = AttributeRouting.CreateAttributeMegaRoute(services); 64var route = AttributeRouting.CreateAttributeMegaRoute(services); 98var route = AttributeRouting.CreateAttributeMegaRoute(services); 136var route = AttributeRouting.CreateAttributeMegaRoute(services);
Routing\KnownRouteValueConstraintTests.cs (9)
71var route = Mock.Of<IRouter>(); 101var route = Mock.Of<IRouter>(); 138var route = Mock.Of<IRouter>(); 167var route = Mock.Of<IRouter>(); 194Mock.Of<IRouter>(),
Routing\UrlHelperTest.cs (8)
24var defaultRoutes = GetDefaultRoutes(services); 39var router = GetDefaultRoutes(services, routeName, template); 54var router = GetDefaultRoutes(services); 76var router = routeBuilder.Build(); 83private static IRouter GetDefaultRoutes(IServiceProvider services) 88private static IRouter GetDefaultRoutes( 95var target = new Mock<IRouter>(MockBehavior.Strict); 116var mockHttpRoute = new Mock<IRouter>();
Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests (11)
RouteDataTest.cs (5)
29original.Routers.Add(Mock.Of<IRouter>()); 108routeData.Routers.Add(Mock.Of<IRouter>()); 129original.Routers.Add(Mock.Of<IRouter>()); 136Mock.Of<IRouter>(), 141routeData.Routers.Add(Mock.Of<IRouter>());
VirtualPathDataTests.cs (6)
14var router = Mock.Of<IRouter>(); 31var router = Mock.Of<IRouter>(); 52var router = Mock.Of<IRouter>();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (9)
PageRemoteAttributeTest.cs (5)
40Routers = { Mock.Of<IRouter>() } 78Routers = { Mock.Of<IRouter>() } 110Routers = { Mock.Of<IRouter>() } 141Routers = { Mock.Of<IRouter>() } 211Routers = { Mock.Of<IRouter>(), },
RemoteAttributeTest.cs (4)
390var routeCollection = GetRouteCollectionWithArea(serviceProvider); 433private static IRouter GetRouteCollectionWithArea(IServiceProvider serviceProvider) 455var handler = new Mock<IRouter>(MockBehavior.Strict); 477Routers = { Mock.Of<IRouter>(), },
Microsoft.AspNetCore.Routing (74)
Builder\RoutingBuilderExtensions.cs (4)
15/// Adds a <see cref="RouterMiddleware"/> middleware to the specified <see cref="IApplicationBuilder"/> with the specified <see cref="IRouter"/>. 18/// <param name="router">The <see cref="IRouter"/> to use for routing requests.</param> 20public static IApplicationBuilder UseRouter(this IApplicationBuilder builder, IRouter router) 38/// with the <see cref="IRouter"/> built from configured <see cref="IRouteBuilder"/>.
Constraints\BoolRouteConstraint.cs (1)
27IRouter? route,
Constraints\CompositeRouteConstraint.cs (1)
41IRouter? route,
Constraints\DateTimeRouteConstraint.cs (1)
33IRouter? route,
Constraints\DecimalRouteConstraint.cs (1)
27IRouter? route,
Constraints\DoubleRouteConstraint.cs (1)
27IRouter? route,
Constraints\FileNameRouteConstraint.cs (1)
98IRouter? route,
Constraints\FloatRouteConstraint.cs (1)
27IRouter? route,
Constraints\GuidRouteConstraint.cs (1)
29IRouter? route,
Constraints\HttpMethodRouteConstraint.cs (1)
35IRouter? route,
Constraints\IntRouteConstraint.cs (1)
27IRouter? route,
Constraints\LengthRouteConstraint.cs (1)
83IRouter? route,
Constraints\LongRouteConstraint.cs (1)
27IRouter? route,
Constraints\MaxLengthRouteConstraint.cs (1)
47IRouter? route,
Constraints\MaxRouteConstraint.cs (1)
41IRouter? route,
Constraints\MinLengthRouteConstraint.cs (1)
47IRouter? route,
Constraints\MinRouteConstraint.cs (1)
41IRouter? route,
Constraints\NonFileNameRouteConstraint.cs (1)
94IRouter? route,
Constraints\NullRouteConstraint.cs (1)
21public bool Match(HttpContext? httpContext, IRouter? route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)
Constraints\OptionalRouteConstraint.cs (1)
41IRouter? route,
Constraints\RangeRouteConstraint.cs (1)
55IRouter? route,
Constraints\RegexErrorStubRouteConstraint.cs (1)
24bool IRouteConstraint.Match(HttpContext? httpContext, IRouter? route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)
Constraints\RegexRouteConstraint.cs (1)
82IRouter? route,
Constraints\RequiredRouteConstraint.cs (1)
21IRouter? route,
Constraints\StringRouteConstraint.cs (1)
29public bool Match(HttpContext? httpContext, IRouter? route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)
INamedRouter.cs (1)
7/// An interface for an <see cref="IRouter"/> with a name.
IRouteBuilder.cs (6)
20/// Gets or sets the default <see cref="IRouter"/> that is used as a handler if an <see cref="IRouter"/> 23IRouter? DefaultHandler { get; set; } 33IList<IRouter> Routes { get; } 36/// Builds an <see cref="IRouter"/> that routes the routes specified in the <see cref="Routes"/> property. 38IRouter Build();
IRouteCollection.cs (2)
14/// <param name="router">A <see cref="IRouter"/> instance.</param> 15void Add(IRouter router);
Route.cs (7)
13private readonly IRouter _target; 18/// <param name="target">An <see cref="IRouter"/> instance associated with the component.</param> 22IRouter target, 38/// <param name="target">An <see cref="IRouter"/> instance associated with the component.</param> 45IRouter target, 58/// <param name="target">An <see cref="IRouter"/> instance associated with the component.</param> 66IRouter target,
RouteBase.cs (1)
14/// Base class implementation of an <see cref="IRouter"/>.
RouteBuilder.cs (7)
30/// <param name="defaultHandler">The default <see cref="IRouter"/> used if a new route is added without a handler.</param> 31public RouteBuilder(IApplicationBuilder applicationBuilder, IRouter? defaultHandler) 47Routes = new List<IRouter>(); 54public IRouter? DefaultHandler { get; set; } 60public IList<IRouter> Routes { get; } 63public IRouter Build() 67foreach (var route in Routes)
RouteCollection.cs (9)
19private readonly List<IRouter> _routes = new List<IRouter>(); 20private readonly List<IRouter> _unnamedRoutes = new List<IRouter>(); 30public IRouter this[int index] 44public void Add(IRouter router) 74var route = this[i]; 127private static VirtualPathData? GetVirtualPath(VirtualPathContext context, List<IRouter> routes) 131var route = routes[i];
RouteConstraintMatcher.cs (1)
40IRouter route,
RouterMiddleware.cs (3)
17private readonly IRouter _router; 24/// <param name="router">The <see cref="IRouter"/> to use for routing requests.</param> 28IRouter router)
Tree\InboundRouteEntry.cs (2)
39/// Gets or sets the <see cref="IRouter"/> to invoke when this entry matches. 41public IRouter Handler { get; set; }
Tree\OutboundRouteEntry.cs (2)
27/// The <see cref="IRouter"/> to invoke when this entry matches. 29public IRouter Handler { get; set; }
Tree\TreeRouteBuilder.cs (4)
73/// <param name="handler">The <see cref="IRouter"/> for handling the route.</param> 81IRouter handler, 173/// <param name="handler">The <see cref="IRouter"/> for handling the link generation.</param> 180IRouter handler,
Tree\TreeRouter.cs (1)
20/// An <see cref="IRouter"/> implementation for attribute routing.
Microsoft.AspNetCore.Routing.Abstractions (19)
IRouteConstraint.cs (1)
37IRouter? route,
RouteContext.cs (2)
9/// A context object for <see cref="IRouter.RouteAsync(RouteContext)"/>. 27/// Gets or sets the handler for the request. An <see cref="IRouter"/> should set <see cref="Handler"/>
RouteData.cs (12)
18private List<IRouter>? _routers; 40_routers = new List<IRouter>(other.Routers); 82/// Gets the list of <see cref="IRouter"/> instances on the current routing path. 84public IList<IRouter> Routers 90_routers = new List<IRouter>(); 122/// <see cref="PushState(IRouter, RouteValueDictionary, RouteValueDictionary)"/>. 126/// An <see cref="IRouter"/> to append to <see cref="Routers"/>. If <c>null</c>, then <see cref="Routers"/> 138public RouteDataSnapshot PushState(IRouter? router, RouteValueDictionary? values, RouteValueDictionary? dataTokens) 142List<IRouter>? routers = null; 148routers = new List<IRouter>(count.Value); 203private readonly IList<IRouter>? _routers; 216IList<IRouter>? routers,
VirtualPathData.cs (4)
20public VirtualPathData(IRouter router, string virtualPath) 32IRouter router, 60/// Gets or sets the <see cref="IRouter"/> that was used to generate the URL. 62public IRouter Router { get; set; }
Microsoft.AspNetCore.Routing.Tests (103)
Builder\RoutingBuilderExtensionsTest.cs (5)
22var router = Mock.Of<IRouter>(); 42var ex = Assert.Throws<InvalidOperationException>(() => app.UseRouter(Mock.Of<IRouter>())); 77var router = new Mock<IRouter>(MockBehavior.Strict); 102var router = new Mock<IRouter>(MockBehavior.Strict);
ConstraintMatcherTest.cs (10)
34route: new Mock<IRouter>().Object, 96route: new Mock<IRouter>().Object, 116route: new Mock<IRouter>().Object, 136route: new Mock<IRouter>().Object, 156route: new Mock<IRouter>().Object, 176route: new Mock<IRouter>().Object, 188route: new Mock<IRouter>().Object, 206route: new Mock<IRouter>().Object, 223IRouter route, 241IRouter route,
Constraints\CompositeRouteConstraintTests.cs (1)
38It.IsAny<IRouter>(),
Constraints\HttpMethodRouteConstraintTests.cs (8)
21var route = Mock.Of<IRouter>(); 42var route = Mock.Of<IRouter>(); 62var route = Mock.Of<IRouter>(); 82var route = Mock.Of<IRouter>();
Constraints\RegexInlineRouteConstraintTests.cs (3)
32route: new Mock<IRouter>().Object, 51route: new Mock<IRouter>().Object, 81route: new Mock<IRouter>().Object,
Constraints\RegexRouteConstraintTests.cs (5)
36route: new Mock<IRouter>().Object, 55route: new Mock<IRouter>().Object, 74route: new Mock<IRouter>().Object, 93route: new Mock<IRouter>().Object, 123route: new Mock<IRouter>().Object,
Constraints\RequiredRouteConstraintTests.cs (4)
23Mock.Of<IRouter>(), 43Mock.Of<IRouter>(), 63Mock.Of<IRouter>(), 83Mock.Of<IRouter>(),
Constraints\StringRouteConstraintTest.cs (7)
22route: new Mock<IRouter>().Object, 42route: new Mock<IRouter>().Object, 62route: new Mock<IRouter>().Object, 82route: new Mock<IRouter>().Object, 102route: new Mock<IRouter>().Object, 122route: new Mock<IRouter>().Object, 146route: new Mock<IRouter>().Object,
DefaultInlineConstraintResolverTest.cs (2)
385IRouter route, 403IRouter route,
DefaultLinkGeneratorProcessTemplateTest.cs (1)
753It.IsAny<IRouter>(),
DefaultLinkGeneratorTest.cs (1)
556public bool Match(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)
DefaultParameterPolicyFactoryTest.cs (2)
423public IRouter Route { get; private set; } 435IRouter route,
InlineRouteParameterParserTests.cs (1)
978IRouter route,
RequestDelegateRouteBuilderExtensionsTest.cs (2)
56var route = builder.Build(); 114var route = builder.Build();
RouteBuilderTest.cs (2)
22var defaultHandler = Mock.Of<IRouter>();
RouteCollectionTest.cs (6)
36var target = new Mock<IRouter>(MockBehavior.Strict); 67var target = new Mock<IRouter>(MockBehavior.Strict); 101var target = new Mock<IRouter>(MockBehavior.Strict); 568var target = new Mock<IRouter>(MockBehavior.Strict); 672private static Mock<IRouter> CreateRoute( 677var target = new Mock<IRouter>(MockBehavior.Strict);
RouteConstraintBuilderTest.cs (1)
171route: new Mock<IRouter>().Object,
RouteOptionsTests.cs (1)
69IRouter route,
RouteTest.cs (17)
29var mockTarget = new Mock<IRouter>(MockBehavior.Strict); 66var mockTarget = new Mock<IRouter>(MockBehavior.Strict); 120var mockTarget = new Mock<IRouter>(MockBehavior.Strict); 174var mockTarget = new Mock<IRouter>(MockBehavior.Strict); 216var mockTarget = new Mock<IRouter>(MockBehavior.Strict); 258var mockTarget = new Mock<IRouter>(MockBehavior.Strict); 298var mockTarget = new Mock<IRouter>(MockBehavior.Strict); 350var mockTarget = new Mock<IRouter>(MockBehavior.Strict); 487var target = CreateTarget(handleRequest: true); 760var target = new Mock<IRouter>(MockBehavior.Strict); 804var target = new Mock<IRouter>(MockBehavior.Strict); 960It.IsAny<IRouter>(), 1736var route = builder.Build(); 1807private static Route CreateRoute(IRouter target, string template) 1819IRouter target, 1833private static IRouter CreateTarget(bool handleRequest = true) 1835var target = new Mock<IRouter>(MockBehavior.Strict);
RoutingServiceCollectionExtensionsTests.cs (1)
56public bool Match(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)
TemplateParserDefaultValuesTests.cs (1)
140routeBuilder.DefaultHandler = Mock.Of<IRouter>();
TestObjects\CapturingConstraint.cs (1)
14IRouter route,
Tree\TreeRouteBuilderTest.cs (9)
25Mock.Of<IRouter>(), 32Mock.Of<IRouter>(), 52Mock.Of<IRouter>(), 59Mock.Of<IRouter>(), 76Mock.Of<IRouter>(), 108Mock.Of<IRouter>(), 152Mock.Of<IRouter>(), 184Mock.Of<IRouter>(), 216Mock.Of<IRouter>(),
Tree\TreeRouterTest.cs (12)
1740List<IRouter> nestedRouters = null; 1742var next = new Mock<IRouter>(); 1748nestedRouters = new List<IRouter>(c.RouteData.Routers); 1777List<IRouter> nestedRouters = null; 1779var next = new Mock<IRouter>(); 1785nestedRouters = new List<IRouter>(c.RouteData.Routers); 1821List<IRouter> nestedRouters = null; 1823var next = new Mock<IRouter>(); 1829nestedRouters = new List<IRouter>(c.RouteData.Routers); 1869var next = new Mock<IRouter>(); 2018IRouter handler = null) 2038IRouter handler = null)
Microsoft.AspNetCore.StaticAssets (1)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
312public bool Match(HttpContext? httpContext, IRouter? route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)
Mvc.RoutingWebSite (1)
QueryStringConstraint.cs (1)
8public bool Match(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)
RoutingWebSite (1)
EndsWithStringRouteConstraint.cs (1)
17public bool Match(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)