Ejemplo n.º 1
0
 private IReadOnlyList <Endpoint> CreateConventionalRoutedEndpoints(ActionDescriptor action, PublicConventionalRouteEntry route)
 {
     return(CreateConventionalRoutedEndpoints(action, new[] { route, }));
 }
Ejemplo n.º 2
0
            private RouteEndpoint CreateConventionalRoutedEndpoint(ActionDescriptor action, PublicConventionalRouteEntry route)
            {
                Assert.NotNull(action.RouteValues);

                var endpoints = new List <Endpoint>();

                Factory.AddEndpoints(endpoints, new HashSet <string>(), action, new[] { route, }, Array.Empty <Action <EndpointBuilder> >(), createInertEndpoints: false);
                var endpoint = Assert.IsType <RouteEndpoint>(Assert.Single(endpoints));

                // This should be true for all conventional-routed actions.
                AssertIsSubset(new RouteValueDictionary(action.RouteValues), endpoint.RoutePattern.RequiredValues);

                return(endpoint);
            }