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