2 writes to Matches
Microsoft.AspNetCore.Routing (2)
Matching\DfaNode.cs (2)
62Matches = new List<Endpoint>(); 72Matches = new List<Endpoint>(endpoints);
194 references to Matches
Microsoft.AspNetCore.Routing (15)
Matching\DfaMatcherBuilder.cs (10)
587node.Matches?.Sort(_comparer); 645var candidates = CreateCandidates(node.Matches); 650if (node.Matches?.Count > 0) 655if (endpointSelectorPolicy.AppliesToEndpoints(node.Matches)) 879if (node.Matches == null || node.Matches.Count == 0) 886node.Matches.Sort(_comparer); 911if (!nodeBuilder.AppliesToEndpoints(parent.Matches ?? (IReadOnlyList<Endpoint>)Array.Empty<Endpoint>())) 921var edges = nodeBuilder.GetEdges(parent.Matches ?? (IReadOnlyList<Endpoint>)Array.Empty<Endpoint>()); 945parent.Matches?.Clear();
Matching\DfaNode.cs (5)
60if (Matches == null) 65Matches.Add(endpoint); 70if (Matches == null) 76Matches.AddRange(endpoints); 120builder.Append(Matches?.Count ?? 0);
Microsoft.AspNetCore.Routing.Tests (179)
Matching\DfaMatcherBuilderTest.cs (179)
30Assert.Same(endpoint, Assert.Single(root.Matches)); 48Assert.Null(root.Matches); 55Assert.Null(a.Matches); 62Assert.Null(b.Matches); 69Assert.Same(endpoint, Assert.Single(c.Matches)); 87Assert.Null(root.Matches); 91Assert.Null(a.Matches); 95Assert.Null(b.Matches); 99Assert.Same(endpoint, Assert.Single(c.Matches)); 117Assert.Null(root.Matches); 123Assert.Same(endpoint, Assert.Single(a.Matches)); 130Assert.Same(endpoint, Assert.Single(catchAll.Matches)); 149Assert.Same(endpoint, Assert.Single(root.Matches)); 155Assert.Same(endpoint, Assert.Single(catchAll.Matches)); 176Assert.Null(root.Matches); 183Assert.Null(a.Matches); 188Assert.Null(b1.Matches); 195Assert.Same(endpoint1, Assert.Single(c1.Matches)); 200Assert.Null(b2.Matches); 207Assert.Same(endpoint2, Assert.Single(c2.Matches)); 228Assert.Null(root.Matches); 235Assert.Null(a.Matches); 240Assert.Null(b1.Matches); 247Assert.Same(endpoint1, Assert.Single(c1.Matches)); 252Assert.Null(b2.Matches); 259Assert.Same(endpoint2, Assert.Single(c2.Matches)); 280Assert.Null(root.Matches); 287Assert.Null(a.Matches); 293Assert.Null(b.Matches); 301c1.Matches, 308Assert.Null(b2.Matches); 315Assert.Same(endpoint2, Assert.Single(c2.Matches)); 336Assert.Null(root.Matches); 343Assert.Null(a.Matches); 347Assert.Null(b.Matches); 355c.Matches, 378Assert.Null(root.Matches); 385Assert.Same(endpoint2, Assert.Single(a.Matches)); 391Assert.Same(endpoint2, Assert.Single(a.Matches)); 399c1.Matches, 406Assert.Same(endpoint2, Assert.Single(catchAll.Matches)); 427Assert.Null(root.Matches); 434Assert.Same(endpoint2, Assert.Single(a.Matches)); 438Assert.Same(endpoint2, Assert.Single(a.Matches)); 446c1.Matches, 453Assert.Same(endpoint2, Assert.Single(catchAll.Matches)); 474Assert.Null(root.Matches); 485Assert.Same(endpoint1, Assert.Single(cNode.Matches)); 493Assert.Null(bNode.Matches); 498Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 521Assert.Null(root.Matches); 532Assert.Same(endpoint1, Assert.Single(cNode.Matches)); 540Assert.Null(bNode.Matches); 545Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 566Assert.Null(root.Matches); 577Assert.Same(endpoint1, Assert.Single(cNode.Matches)); 585Assert.Null(bNode.Matches); 590Assert.Same(endpoint2, Assert.Single(paramBCNode.Matches)); 600Assert.Null(bParamNode.Matches); 605Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 629Assert.Null(root.Matches); 640Assert.Same(endpoint3, Assert.Single(cNode.Matches)); 648Assert.Null(bNode.Matches); 653Assert.Equal(new[] { endpoint1, endpoint2 }, paramBCNode.Matches.ToArray()); 663Assert.Null(bParamNode.Matches); 668Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 689Assert.Null(root.Matches); 700Assert.Same(endpoint1, Assert.Single(cNode.Matches)); 708Assert.Null(bNode.Matches); 713Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 734Assert.Null(root.Matches); 745Assert.Same(endpoint1, Assert.Single(cNode.Matches)); 753Assert.Null(bNode.Matches); 758Assert.Same(endpoint2, Assert.Single(paramBCNode.Matches)); 768Assert.Null(bParamNode.Matches); 773Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 794Assert.Null(root.Matches); 805Assert.Same(endpoint1, Assert.Single(cNode.Matches)); 813Assert.Null(bNode.Matches); 818Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 839Assert.Null(root.Matches); 850Assert.Same(endpoint1, Assert.Single(cNode.Matches)); 858Assert.Null(bNode.Matches); 863Assert.Same(endpoint2, Assert.Single(paramBCNode.Matches)); 873Assert.Null(bParamNode.Matches); 878Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 899Assert.Null(root.Matches); 910Assert.Same(endpoint1, Assert.Single(cNode.Matches)); 918Assert.Null(bNode.Matches); 923Assert.Same(endpoint2, Assert.Single(paramBCNode.Matches)); 933Assert.Null(bParamNode.Matches); 938Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 962Assert.Null(root.Matches); 975Assert.Same(endpoint1, Assert.Single(cNode.Matches)); 985Assert.Null(bParamNode.Matches); 990Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 1014Assert.Null(root.Matches); 1025Assert.Same(endpoint3, Assert.Single(cNode.Matches)); 1033Assert.Null(bNode.Matches); 1038Assert.Equal(new[] { endpoint1, endpoint2 }, paramBCNode.Matches.ToArray()); 1048Assert.Null(bParamNode.Matches); 1053Assert.Same(endpoint2, Assert.Single(paramCNode.Matches)); 2409Assert.Null(root.Matches); 2416Assert.Same(endpoint2, Assert.Single(a.Matches)); 2421b.Matches, 2429Assert.Same(endpoint2, Assert.Single(catchAll.Matches)); 2452Assert.Null(root.Matches); 2459Assert.Same(endpoint1, Assert.Single(a.Matches)); 2464b.Matches, 2472Assert.Same(endpoint1, Assert.Single(catchAll.Matches)); 2495Assert.Null(root.Matches); 2501Assert.Same(endpoint2, Assert.Single(a1.Matches)); 2506b1.Matches, 2514Assert.Same(endpoint2, Assert.Single(catchAll1.Matches)); 2520Assert.Null(a2.Matches); 2525b2.Matches, 2549Assert.Null(root.Matches); 2555Assert.Same(endpoint1, Assert.Single(a1.Matches)); 2560b1.Matches, 2568Assert.Same(endpoint1, Assert.Single(catchAll1.Matches)); 2574Assert.Null(a2.Matches); 2579b2.Matches, 2599Assert.Null(root.Matches); 2605Assert.Same(endpoint1, Assert.Single(a1.Matches)); 2609Assert.Same(endpoint2, Assert.Single(b1.Matches)); 2615Assert.Null(a2.Matches); 2620b2.Matches, 2640Assert.Null(root.Matches); 2647Assert.Empty(a.Matches); 2654Assert.Empty(a.Matches); 2661Assert.Same(endpoint1, Assert.Single(test2_true.Matches)); 2685Assert.Null(root.Matches); 2692Assert.Empty(a.Matches); 2700Assert.Empty(test1_0.Matches); 2707Assert.Same(endpoint1, Assert.Single(test2_true.Matches)); 2712Assert.Empty(test1_1.Matches); 2720Assert.Same(endpoint2, Assert.Single(test2_true.Matches)); 2725Assert.Same(endpoint3, Assert.Single(test2_false.Matches)); 2749Assert.Null(root.Matches); 2756Assert.Empty(a.Matches); 2764Assert.Equal(new[] { endpoint1, endpoint2, }, test2_true.Matches); 2769Assert.Equal(new[] { endpoint3, }, test2_false.Matches); 2793Assert.Null(root.Matches); 2800Assert.Empty(a.Matches); 2808Assert.Equal(new[] { endpoint1, }, test1_0.Matches); 2813Assert.Equal(new[] { endpoint2, endpoint3, }, test1_1.Matches); 2837Assert.Null(root.Matches); 2844Assert.Empty(a.Matches); 2853Assert.Equal(new[] { endpoint1, }, test1_0.Matches); 2858Assert.Equal(new[] { endpoint2, endpoint3, }, test1_1.Matches); 2863Assert.Equal("MaxValueEndpoint", Assert.Single(nonRouteEndpoint.Matches).DisplayName); 2885Assert.Null(root.Matches); 2892Assert.Equal(new[] { endpoint1, endpoint2, endpoint3, }, a.Matches); 2954Assert.Null(root.Matches); 2961Assert.Null(home.Matches); 2968Assert.Same(endpoint, Assert.Single(index.Matches)); 2988Assert.Same(endpoint, Assert.Single(root.Matches)); 2995Assert.Same(endpoint, Assert.Single(home.Matches)); 3002Assert.Same(endpoint, Assert.Single(index.Matches)); 3022Assert.Null(root.Matches); 3029Assert.Same(endpoint, Assert.Single(login.Matches)); 3036Assert.Same(endpoint, Assert.Single(index.Matches)); 3068Assert.Same(endpoint1, Assert.Single(root.Matches)); 3075Assert.Same(endpoint1, Assert.Single(home.Matches)); 3082Assert.Same(endpoint1, Assert.Single(homeIndex.Matches)); 3086Assert.Same(endpoint1, Assert.Single(homeIndex.Parameters.Matches)); 3090Assert.Same(endpoint2, Assert.Single(login.Matches)); 3097Assert.Same(endpoint2, Assert.Single(loginIndex.Matches)); 3101Assert.Same(endpoint2, Assert.Single(loginIndex.Parameters.Matches)); 3105Assert.Same(endpoint3, Assert.Single(loginChangePassword.Matches)); 3109Assert.Same(endpoint3, Assert.Single(loginChangePassword.Parameters.Matches)); 3128Assert.Same(endpoint, Assert.Single(root.Matches)); 3135Assert.Same(endpoint, Assert.Single(home.Matches)); 3142Assert.Same(endpoint, Assert.Single(index.Matches)); 3161Assert.Null(root.Matches); 3168Assert.Null(conventionalTransformerRoute.Matches); 3175Assert.Same(endpoint, Assert.Single(conventionalTransformer.Matches)); 3181Assert.Same(endpoint, Assert.Single(index.Matches)); 3185Assert.Same(endpoint, Assert.Single(index.Parameters.Matches));