47 instantiations of RouteEndpoint
Benchmarks (1)
StartupUsingEndpointRouting.cs (1)
26new RouteEndpoint(
DeveloperExceptionPageSample (1)
Startup.cs (1)
25var endpoint = new RouteEndpoint(
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
RazorComponentEndpointInvokerTest.cs (1)
34context.SetEndpoint(new RouteEndpoint(
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (12)
Logging\HttpUtilityExtensionsTests.cs (2)
40var endpoint = new RouteEndpoint( 69var endpoint = new RouteEndpoint(
Logging\IncomingHttpRouteUtilityTests.cs (10)
44var endpoint = new RouteEndpoint( 82var endpoint = new RouteEndpoint( 122var endpoint = new RouteEndpoint( 164var endpoint = new RouteEndpoint( 206var endpoint = new RouteEndpoint( 253var endpoint = new RouteEndpoint( 294var endpoint = new RouteEndpoint( 342var endpoint = new RouteEndpoint( 387var endpoint = new RouteEndpoint( 425var endpoint = new RouteEndpoint(
Microsoft.AspNetCore.Mvc.Core.Test (3)
Routing\ControllerLinkGeneratorExtensionsTest.cs (1)
199return new RouteEndpoint(
Routing\EndpointRoutingUrlHelperTest.cs (1)
269return new RouteEndpoint(
Routing\PageLinkGeneratorExtensionsTest.cs (1)
169return new RouteEndpoint(
Microsoft.AspNetCore.Routing (1)
RouteEndpointBuilder.cs (1)
55return new RouteEndpoint(
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
EndpointRoutingBenchmarkBase.cs (1)
118return new RouteEndpoint(
Microsoft.AspNetCore.Routing.Tests (27)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (1)
79var endpoint = new RouteEndpoint(
Builder\GroupTest.cs (1)
375dynamicDataSource.AddEndpoint(new RouteEndpoint(
CompositeEndpointDataSourceTest.cs (1)
500return new RouteEndpoint(
EndpointFactory.cs (1)
31return new RouteEndpoint(
Internal\DfaGraphWriterTest.cs (2)
45new RouteEndpoint( 68new RouteEndpoint(
MatcherPolicyTest.cs (1)
62return new RouteEndpoint(
Matching\AcceptsMatcherPolicyTest.cs (1)
611return new RouteEndpoint(
Matching\DataSourceDependentMatcherTest.cs (11)
37var endpoint = new RouteEndpoint( 62var endpoint = new RouteEndpoint( 102var endpoint = new RouteEndpoint( 124var endpoint = new RouteEndpoint( 147dataSource.AddEndpoint(new RouteEndpoint( 154dataSource.AddEndpoint(new RouteEndpoint( 175dataSource.AddEndpoint(new RouteEndpoint( 182dataSource.AddEndpoint(new RouteEndpoint( 190anotherDataSource.AddEndpoint(new RouteEndpoint( 213dataSource.AddEndpoint(new RouteEndpoint( 226() => dataSource.AddEndpoint(new RouteEndpoint(
Matching\DefaultEndpointSelectorTest.cs (1)
177return new RouteEndpoint(
Matching\EndpointComparerTest.cs (1)
244return new RouteEndpoint(
Matching\HostMatcherPolicyIntegrationTestBase.cs (1)
419return new RouteEndpoint(
Matching\HostMatcherPolicyTest.cs (1)
271return new RouteEndpoint(
Matching\HttpMethodMatcherPolicyIntegrationTestBase.cs (1)
401return new RouteEndpoint(
Matching\HttpMethodMatcherPolicyTest.cs (1)
401return new RouteEndpoint(
Matching\MatcherConformanceTest.cs (1)
37return new RouteEndpoint(
RouteValuesAddressSchemeTest.cs (1)
443return new RouteEndpoint(
902 references to RouteEndpoint
DeveloperExceptionPageSample (1)
Startup.cs (1)
25var endpoint = new RouteEndpoint(
IntegrationTestsWebsite (3)
Infrastructure\DynamicEndpointDataSource.cs (3)
39if (newEndpoint is RouteEndpoint routeEndpoint) 41var existingMatch = _endpoints 42.OfType<RouteEndpoint>()
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.cs (1)
123if (httpContext.GetEndpoint() is RouteEndpoint routeEndpoint)
Microsoft.AspNetCore.Components.Endpoints.Tests (21)
Builder\RazorComponentsEndpointConventionBuilderExtensionsTest.cs (1)
243Assert.Equal(frameworkEndpoint, ((RouteEndpoint)webJSEndpoint).RoutePattern.RawText);
HotReloadServiceTests.cs (16)
49var endpoint = Assert.IsType<RouteEndpoint>( 71(ep) => Assert.Equal("/app/test", ((RouteEndpoint)ep).RoutePattern.RawText), 72(ep) => Assert.Equal("/server", ((RouteEndpoint)ep).RoutePattern.RawText)); 84var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpointDataSource.Endpoints, 108var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpointDataSource.Endpoints, e => e.Metadata.GetMetadata<RootComponentMetadata>() != null)); 118var updatedEndpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpointDataSource.Endpoints, e => e.Metadata.GetMetadata<RootComponentMetadata>() != null)); 134var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpointDataSource.Endpoints, e => e.Metadata.GetMetadata<RootComponentMetadata>() != null)); 136var compositeEndpoint = Assert.IsType<RouteEndpoint>(Assert.Single(compositeEndpointDataSource.Endpoints, e => e.Metadata.GetMetadata<RootComponentMetadata>() != null)); 183var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpointDataSource.Endpoints, e => e.Metadata.GetMetadata<RootComponentMetadata>() != null));
RazorComponentEndpointFactoryTest.cs (4)
36var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 133var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint);
Microsoft.AspNetCore.Components.Server (2)
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (2)
147var routeEndpoint = (RouteEndpoint)endpoint;
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
WebAssemblyEndpointProvider.cs (2)
70var routeEndpoint = (RouteEndpoint)endpoint;
Microsoft.AspNetCore.Diagnostics (1)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
349if (endpoint is RouteEndpoint routeEndpoint)
Microsoft.AspNetCore.Diagnostics.Middleware (3)
Logging\HttpLoggingRedactionInterceptor.cs (2)
89var endpoint = context.GetEndpoint() as RouteEndpoint;
Logging\HttpUtilityExtensions.cs (1)
41if (endpoint is RouteEndpoint routeEndpoint)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (12)
Logging\HttpUtilityExtensionsTests.cs (2)
40var endpoint = new RouteEndpoint( 69var endpoint = new RouteEndpoint(
Logging\IncomingHttpRouteUtilityTests.cs (10)
44var endpoint = new RouteEndpoint( 82var endpoint = new RouteEndpoint( 122var endpoint = new RouteEndpoint( 164var endpoint = new RouteEndpoint( 206var endpoint = new RouteEndpoint( 253var endpoint = new RouteEndpoint( 294var endpoint = new RouteEndpoint( 342var endpoint = new RouteEndpoint( 387var endpoint = new RouteEndpoint( 425var endpoint = new RouteEndpoint(
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (11)
JsonTranscodingServiceMethodProviderTests.cs (11)
28var endpoint = FindGrpcEndpoint(endpoints, nameof(JsonTranscodingGreeterService.SayHello)); 43var endpoint = FindGrpcEndpoint(endpoints, nameof(JsonTranscodingGreeterService.Custom)); 60var getMethodModel = matchedEndpoints[0]; 65var additionalMethodModel = matchedEndpoints[1]; 77var startFrameImport = Assert.Single(FindGrpcEndpoints(endpoints, nameof(JsonTranscodingColonRouteService.StartFrameImport))); 78var getFrameImport = Assert.Single(FindGrpcEndpoints(endpoints, nameof(JsonTranscodingColonRouteService.GetFrameImport))); 155var endpoint = Assert.Single(matchedEndpoints); 223private static RouteEndpoint FindGrpcEndpoint(IReadOnlyList<Endpoint> endpoints, string methodName) 225var e = FindGrpcEndpoints(endpoints, methodName).SingleOrDefault(); 234private static List<RouteEndpoint> FindGrpcEndpoints(IReadOnlyList<Endpoint> endpoints, string methodName) 238.Cast<RouteEndpoint>()
Microsoft.AspNetCore.Grpc.Swagger (2)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (2)
41if (endpoint is RouteEndpoint routeEndpoint) 62private static ApiDescription CreateApiDescription(RouteEndpoint routeEndpoint, HttpRule httpRule, MethodDescriptor methodDescriptor, string pattern, string verb)
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
EndpointMetadataApiDescriptionProvider.cs (4)
60if (endpoint is RouteEndpoint routeEndpoint && 83private ApiDescription CreateApiDescription(RouteEndpoint routeEndpoint, string httpMethod, MethodInfo methodInfo, bool disableInferredBody) 171private ApiParameterDescription? CreateApiParameterDescription(IParameterBindingMetadata parameter, RouteEndpoint routeEndpoint, bool disableInferredBody) 250private (BindingSource, string, bool, Type) GetBindingSourceAndName(IParameterBindingMetadata parameter, RouteEndpoint routeEndpoint, bool disableInferredBody)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
EndpointMetadataApiDescriptionProviderTest.cs (1)
1555var endpoint = new RouteEndpoint(httpContext => Task.CompletedTask, routePattern, 0, endpointMetadata, displayName);
Microsoft.AspNetCore.Mvc.Core (11)
Builder\ControllerEndpointRouteBuilderExtensions.cs (10)
165/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 223/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 287/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 347/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 413/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will 421/// This method allows the registration of a <see cref="RouteEndpoint"/> and <see cref="DynamicRouteValueTransformer"/> 438/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will 447/// This method allows the registration of a <see cref="RouteEndpoint"/> and <see cref="DynamicRouteValueTransformer"/> 472/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will 482/// This method allows the registration of a <see cref="RouteEndpoint"/> and <see cref="DynamicRouteValueTransformer"/>
Routing\ActionEndpointFactory.cs (1)
273endpoints.Add((RouteEndpoint)builder.Build());
Microsoft.AspNetCore.Mvc.Core.Test (71)
Routing\ActionEndpointDataSourceBaseTest.cs (5)
35var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpoints)); 61(e) => Assert.Equal("/test", Assert.IsType<RouteEndpoint>(e).RoutePattern.RawText)); 98var routePattern = Assert.IsType<RouteEndpoint>(e).RoutePattern; 120var routePattern = Assert.IsType<RouteEndpoint>(e).RoutePattern;
Routing\ActionEndpointFactoryTest.cs (17)
45var endpoint = CreateConventionalRoutedEndpoint(action, route); 146var endpoint = CreateConventionalRoutedEndpoint(action, route); 181var endpoint = CreateAttributeRoutedEndpoint(action); 229var endpoint = CreateAttributeRoutedEndpoint(action); 247var endpoint = CreateAttributeRoutedEndpoint(action); 284var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpoints)); 346var matcherEndpoint = Assert.IsType<RouteEndpoint>(ep); 354var matcherEndpoint = Assert.IsType<RouteEndpoint>(ep); 376private RouteEndpoint CreateAttributeRoutedEndpoint(ActionDescriptor action) 389return Assert.IsType<RouteEndpoint>(Assert.Single(endpoints)); 392private RouteEndpoint CreateConventionalRoutedEndpoint(ActionDescriptor action, string template) 397private RouteEndpoint CreateConventionalRoutedEndpoint(ActionDescriptor action, ConventionalRouteEntry route) 412var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpoints));
Routing\ControllerActionEndpointDataSourceTest.cs (12)
91endpoints.OfType<RouteEndpoint>().Where(e => !SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 104endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 173endpoints.OfType<RouteEndpoint>().Where(e => !SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 188endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 260endpoints.OfType<RouteEndpoint>().Where(e => !SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 273endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 342endpoints.OfType<RouteEndpoint>().Where(e => !SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 357endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 436endpoints.OfType<RouteEndpoint>().Where(e => !SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 453endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 526endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText), 546private static bool SupportsLinkGeneration(RouteEndpoint endpoint)
Routing\ControllerLinkGeneratorExtensionsTest.cs (12)
17var endpoint1 = CreateEndpoint( 46var endpoint1 = CreateEndpoint( 50var endpoint2 = CreateEndpoint( 76var endpoint1 = CreateEndpoint( 80var endpoint2 = CreateEndpoint( 104var endpoint1 = CreateEndpoint( 108var endpoint2 = CreateEndpoint( 135var endpoint1 = CreateEndpoint( 139var endpoint2 = CreateEndpoint( 165var endpoint1 = CreateEndpoint( 169var endpoint2 = CreateEndpoint( 192private RouteEndpoint CreateEndpoint(
Routing\EndpointRoutingUrlHelperTest.cs (14)
18var endpoint1 = CreateEndpoint( 23var endpoint2 = CreateEndpoint( 43var endpoint1 = CreateEndpoint( 48var endpoint2 = CreateEndpoint( 76var endpoint1 = CreateEndpoint( 81var endpoint2 = CreateEndpoint( 102var endpoint = CreateEndpoint( 118return CreateUrlHelper(Enumerable.Empty<RouteEndpoint>(), appRoot, host, protocol); 163var endpoint = CreateEndpoint(template, new RouteValueDictionary(defaults), requiredValues, routeName: routeName); 170private IUrlHelper CreateUrlHelper(IEnumerable<RouteEndpoint> endpoints, ActionContext actionContext = null) 179IEnumerable<RouteEndpoint> endpoints, 190private List<RouteEndpoint> GetDefaultEndpoints() 192var endpoints = new List<RouteEndpoint>(); 254private RouteEndpoint CreateEndpoint(
Routing\PageLinkGeneratorExtensionsTest.cs (11)
18var endpoint1 = CreateEndpoint( 22var endpoint2 = CreateEndpoint( 47var endpoint1 = CreateEndpoint( 51var endpoint2 = CreateEndpoint( 75var endpoint1 = CreateEndpoint( 79var endpoint2 = CreateEndpoint( 105var endpoint1 = CreateEndpoint( 109var endpoint2 = CreateEndpoint( 135var endpoint1 = CreateEndpoint( 139var endpoint2 = CreateEndpoint( 162private RouteEndpoint CreateEndpoint(
Microsoft.AspNetCore.Mvc.RazorPages (10)
Builder\RazorPagesEndpointRouteBuilderExtensions.cs (10)
42/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 92/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 150/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 204/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 264/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will 272/// This method allows the registration of a <see cref="RouteEndpoint"/> and <see cref="DynamicRouteValueTransformer"/> 287/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will 296/// This method allows the registration of a <see cref="RouteEndpoint"/> and <see cref="DynamicRouteValueTransformer"/> 320/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will 330/// This method allows the registration of a <see cref="RouteEndpoint"/> and <see cref="DynamicRouteValueTransformer"/>
Microsoft.AspNetCore.Mvc.RazorPages.Test (9)
Infrastructure\PageActionEndpointDataSourceTest.cs (4)
84endpoints.OfType<RouteEndpoint>().OrderBy(e => e.RoutePattern.RawText), 154endpoints.OfType<RouteEndpoint>().OrderBy(e => e.RoutePattern.RawText), 204endpoints.OfType<RouteEndpoint>().OrderBy(e => e.RoutePattern.RawText), 252endpoints.OfType<RouteEndpoint>().OrderBy(e => e.RoutePattern.RawText),
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (5)
35var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpoints)); 61(e) => Assert.Equal("/test", Assert.IsType<RouteEndpoint>(e).RoutePattern.RawText)); 98var routePattern = Assert.IsType<RouteEndpoint>(e).RoutePattern; 120var routePattern = Assert.IsType<RouteEndpoint>(e).RoutePattern;
Microsoft.AspNetCore.OpenApi.Tests (3)
Extensions\OpenApiEndpointRouteBuilderExtensionsTests.cs (2)
44var generatedEndpoint = Assert.IsType<RouteEndpoint>(builder.DataSources.First().Endpoints.First());
Extensions\OpenApiRouteHandlerBuilderExtensionTests.cs (1)
228e => ((RouteEndpoint)e).RoutePattern.RawText,
Microsoft.AspNetCore.Routing (100)
Builder\EndpointRouteBuilderExtensions.cs (18)
58/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP GET requests 74/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP POST requests 90/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP PUT requests 106/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP DELETE requests 122/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP PATCH requests 138/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests 158/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests 174/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests 221/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP GET requests 239/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP POST requests 257/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP PUT requests 275/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP DELETE requests 293/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP PATCH requests 311/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests 332/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests 350/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests 368/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 394/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match
Builder\FallbackEndpointRouteBuilderExtensions.cs (2)
21/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 48/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match
DefaultLinkGenerator.cs (17)
33private readonly DataSourceDependentCache<ConcurrentDictionary<RouteEndpoint, TemplateBinder>> _cache; 36private readonly Func<RouteEndpoint, TemplateBinder> _createTemplateBinder; 51_cache = new DataSourceDependentCache<ConcurrentDictionary<RouteEndpoint, TemplateBinder>>(dataSource, (_) => 55return new ConcurrentDictionary<RouteEndpoint, TemplateBinder>(); 182private List<RouteEndpoint> GetEndpoints<TAddress>(TAddress address) 185var endpoints = addressingScheme.FindEndpoints(address).OfType<RouteEndpoint>().ToList(); 201List<RouteEndpoint> endpoints, 210var endpoint = endpoints[i]; 235List<RouteEndpoint> endpoints, 246var endpoint = endpoints[i]; 271private TemplateBinder CreateTemplateBinder(RouteEndpoint endpoint) 277internal TemplateBinder GetTemplateBinder(RouteEndpoint endpoint) => _cache.EnsureInitialized().GetOrAdd(endpoint, _createTemplateBinder); 282RouteEndpoint endpoint, 354public static void TemplateSucceeded(ILogger logger, RouteEndpoint endpoint, PathString path, QueryString query) 362public static void TemplateFailedRequiredValues(ILogger logger, RouteEndpoint endpoint, RouteValueDictionary? ambientValues, RouteValueDictionary values) 379public static void TemplateFailedConstraint(ILogger logger, RouteEndpoint endpoint, string? parameterName, IRouteConstraint? constraint, RouteValueDictionary values) 395public static void TemplateFailedExpansion(ILogger logger, RouteEndpoint endpoint, RouteValueDictionary values)
DefaultLinkParser.cs (10)
20private readonly DataSourceDependentCache<ConcurrentDictionary<RouteEndpoint, MatcherState>> _matcherCache; 23private readonly Func<RouteEndpoint, MatcherState> _createMatcher; 37_matcherCache = new DataSourceDependentCache<ConcurrentDictionary<RouteEndpoint, MatcherState>>(dataSource, (_) => 41return new ConcurrentDictionary<RouteEndpoint, MatcherState>(); 58var endpoint = endpoints[i]; 70private List<RouteEndpoint> GetEndpoints<TAddress>(TAddress address) 73var endpoints = addressingScheme.FindEndpoints(address).OfType<RouteEndpoint>().ToList(); 87private MatcherState CreateRoutePatternMatcher(RouteEndpoint endpoint) 116internal MatcherState GetMatcherState(RouteEndpoint endpoint) => _matcherCache.EnsureInitialized().GetOrAdd(endpoint, _createMatcher); 119internal bool TryParse(RouteEndpoint endpoint, PathString path, [NotNullWhen(true)] out RouteValueDictionary? values)
EndpointDataSource.cs (4)
39var wrappedEndpoints = new RouteEndpoint[endpoints.Count]; 47if (endpoint is not RouteEndpoint routeEndpoint) 82wrappedEndpoints[i] = (RouteEndpoint)routeEndpointBuilder.Build(); 100if (endpoint is RouteEndpoint routeEndpoint)
Internal\DfaGraphWriter.cs (1)
47if (endpoints[i] is RouteEndpoint endpoint && (endpoint.Metadata.GetMetadata<ISuppressMatchingMetadata>()?.SuppressMatching ?? false) == false)
Matching\DataSourceDependentMatcher.cs (1)
47if (endpoints[i] is RouteEndpoint endpoint)
Matching\DfaMatcher.cs (1)
430return (endpoint as RouteEndpoint)?.RoutePattern?.RawText ?? "(none)";
Matching\DfaMatcherBuilder.cs (14)
18private readonly List<RouteEndpoint> _endpoints = new List<RouteEndpoint>(); 62public override void AddEndpoint(RouteEndpoint endpoint) 81var endpoint = _endpoints[i]; 252RouteEndpoint endpoint, 372private void AddParentsMatchingComplexSegment(RouteEndpoint endpoint, List<DfaNode> nextParents, RoutePatternPathSegment segment, DfaNode parent, RoutePatternParameterPart parameterPart) 473private void AddRequiredLiteralValue(RouteEndpoint endpoint, List<DfaNode> nextParents, DfaNode parent, RoutePatternParameterPart parameterPart, object requiredValue) 511private static RoutePatternPathSegment GetCurrentSegment(RouteEndpoint endpoint, int depth) 532private static int GetPrecedenceDigitAtDepth(RouteEndpoint endpoint, int depth) 739if (endpoint is RouteEndpoint routeEndpoint) 848private static bool HasAdditionalRequiredSegments(RouteEndpoint endpoint, int depth) 992public RouteEndpoint Endpoint { get; } 998public DfaBuilderWorkerWorkItem(RouteEndpoint endpoint, int precedenceDigit, List<DfaNode> parents) 1005public void Deconstruct(out RouteEndpoint endpoint, out int precedenceDigit, out List<DfaNode> parents)
Matching\EndpointComparer.cs (12)
55var routeEndpointX = x as RouteEndpoint; 56var routeEndpointY = y as RouteEndpoint; 112var routeEndpointX = x as RouteEndpoint; 113var routeEndpointY = y as RouteEndpoint; 139var routeEndpointX = x as RouteEndpoint; 140var routeEndpointY = y as RouteEndpoint;
Matching\MatcherBuilder.cs (1)
8public abstract void AddEndpoint(RouteEndpoint endpoint);
RouteEndpoint.cs (1)
15/// Initializes a new instance of the <see cref="RouteEndpoint"/> class.
RouteEndpointBuilder.cs (2)
15/// Supports building a new <see cref="RouteEndpoint"/>. 52throw new InvalidOperationException($"{nameof(RequestDelegate)} must be specified to construct a {nameof(RouteEndpoint)}.");
RouteEndpointDataSource.cs (6)
87public override IReadOnlyList<RouteEndpoint> Endpoints 91var endpoints = new RouteEndpoint[_routeEntries.Count]; 94endpoints[i] = (RouteEndpoint)CreateRouteEndpointBuilder(_routeEntries[i]).Build(); 100public override IReadOnlyList<RouteEndpoint> GetGroupedEndpoints(RouteGroupContext context) 102var endpoints = new RouteEndpoint[_routeEntries.Count]; 105endpoints[i] = (RouteEndpoint)CreateRouteEndpointBuilder(_routeEntries[i], context.Prefix, context.Conventions, context.FinallyConventions).Build();
RouteGroupContext.cs (5)
15/// Gets the <see cref="RouteEndpoint.RoutePattern"/> which should prefix the <see cref="RouteEndpoint.RoutePattern"/> of all <see cref="RouteEndpoint"/> instances 23/// via <see cref="IEndpointConventionBuilder.Add(Action{EndpointBuilder})"/>. These should be applied in order when building every <see cref="RouteEndpoint"/> 30/// via <see cref="IEndpointConventionBuilder.Add(Action{EndpointBuilder})"/>. These should be applied in LIFO order when building every <see cref="RouteEndpoint"/>
RouteValuesAddressScheme.cs (4)
49return new[] { (RouteEndpoint)matchResults[0].Match.Entry.Data }; 66yield return (RouteEndpoint)matchResults[i].Match.Entry.Data; 95if (!(endpoint is RouteEndpoint routeEndpoint)) 147RouteEndpoint endpoint,
ShortCircuit\RouteShortCircuitEndpointRouteBuilderExtensions.cs (1)
16/// Adds a <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that matches HTTP requests (all verbs)
Microsoft.AspNetCore.Routing.Microbenchmarks (39)
EndpointRoutingBenchmarkBase.cs (7)
18private protected RouteEndpoint[] Endpoints; 21private protected void SetupEndpoints(params RouteEndpoint[] endpoints) 75message.AppendLine(FormattableString.Invariant($"expected: '{((RouteEndpoint)expected)?.DisplayName ?? "null"}'")); 76message.AppendLine(FormattableString.Invariant($"actual: '{((RouteEndpoint)actual)?.DisplayName ?? "null"}'")); 94protected RouteEndpoint CreateEndpoint(string template, string httpMethod) 102protected RouteEndpoint CreateEndpoint( 135protected void CreateOutboundRouteEntry(TreeRouteBuilder treeRouteBuilder, RouteEndpoint endpoint)
LinkGeneration\LinkGenerationGithubBenchmark.cs (2)
28foreach (var endpoint in Endpoints) 39var endpointToTest = Endpoints[176];
LinkGeneration\LinkGenerationGithubBenchmark.generated.cs (2)
17Endpoints = new RouteEndpoint[243]; 1488private RouteEndpoint CreateEndpoint(string template, string controllerName, string actionName, string httpMethod)
Matching\CreateMatcherRegexConstraintBenchmark.cs (1)
18Endpoints = new RouteEndpoint[EndpointCount];
Matching\MatcherAzureBenchmarkBase.generated.cs (1)
16Endpoints = new RouteEndpoint[5160];
Matching\MatcherBuilderMultipleEntryBenchmark.cs (1)
25Endpoints = new RouteEndpoint[10];
Matching\MatcherGithubBenchmarkBase.generated.cs (1)
16Endpoints = new RouteEndpoint[243];
Matching\MatcherSingleEntryBenchmark.cs (1)
20Endpoints = new RouteEndpoint[1];
Matching\TrivialMatcher.cs (2)
13private readonly RouteEndpoint _endpoint; 16public TrivialMatcher(RouteEndpoint endpoint)
Matching\TrivialMatcherBuilder.cs (3)
8private readonly List<RouteEndpoint> _endpoints = new List<RouteEndpoint>(); 10public override void AddEndpoint(RouteEndpoint endpoint)
src\Http\Routing\test\UnitTests\Matching\BarebonesMatcher.cs (2)
39public readonly RouteEndpoint Endpoint; 44public InnerMatcher(string[] segments, RouteEndpoint endpoint)
src\Http\Routing\test\UnitTests\Matching\BarebonesMatcherBuilder.cs (4)
11private readonly List<RouteEndpoint> _endpoints = new List<RouteEndpoint>(); 13public override void AddEndpoint(RouteEndpoint endpoint) 23var endpoint = _endpoints[i];
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (6)
15private readonly List<RouteEndpoint> _endpoints; 22_endpoints = new List<RouteEndpoint>(); 25public override void AddEndpoint(RouteEndpoint endpoint) 44var endpoint = group.First(); 77private readonly RouteEndpoint[] _candidates; 81public SelectorRouter(EndpointSelector selector, RouteEndpoint[] candidates)
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (6)
17private readonly List<RouteEndpoint> _endpoints; 21_endpoints = new List<RouteEndpoint>(); 24public override void AddEndpoint(RouteEndpoint endpoint) 55var endpoint = group.First(); 79private readonly RouteEndpoint[] _candidates; 83public SelectorRouter(EndpointSelector selector, RouteEndpoint[] candidates)
Microsoft.AspNetCore.Routing.Tests (585)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (1)
79var endpoint = new RouteEndpoint(
Builder\FallbackEndpointRouteBuilderExtensionsTest.cs (2)
29Assert.Equal(int.MaxValue, ((RouteEndpoint)endpoint).Order); 45Assert.Equal(int.MaxValue, ((RouteEndpoint)endpoint).Order);
Builder\GroupTest.cs (13)
35var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 67var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 101var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 251var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 296var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 346Assert.Collection(dataSource.Endpoints.OfType<RouteEndpoint>(), 382var prefixedEndpoint = Assert.IsType<RouteEndpoint>(Assert.Single(groupDataSource.Endpoints));
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (3)
892var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 948.ToDictionary(e => ((RouteEndpoint)e).RoutePattern.RawText!);
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (2)
236var endpoint = builder.Build() as RouteEndpoint;
CompositeEndpointDataSourceTest.cs (50)
22var endpoint1 = CreateEndpoint("/a"); 23var endpoint2 = CreateEndpoint("/b"); 38var endpoint1 = CreateEndpoint("/a"); 39var endpoint2 = CreateEndpoint("/b"); 40var dataSource = new TestGroupDataSource(new RouteEndpoint[] { endpoint1, endpoint2 }); 87var endpoint1 = CreateEndpoint("/a"); 88var endpoint2 = CreateEndpoint("/b"); 89var endpoint3 = CreateEndpoint("/c"); 90var endpoint4 = CreateEndpoint("/d"); 91var endpoint5 = CreateEndpoint("/e"); 116var endpoint1 = CreateEndpoint("/a"); 128var endpoint2 = CreateEndpoint("/b"); 140var endpoint3 = CreateEndpoint("/c"); 157var endpoint1 = CreateEndpoint("/a"); 170var endpoint2 = CreateEndpoint("/b"); 183var endpoint3 = CreateEndpoint("/c"); 200var endpoint1 = CreateEndpoint("/a"); 209var endpoint2 = CreateEndpoint("/b"); 222var endpoint3 = CreateEndpoint("/c"); 236var endpoint1 = CreateEndpoint("/a"); 245var endpoint2 = CreateEndpoint("/b"); 257var endpoint3 = CreateEndpoint("/c"); 271var endpoint4 = CreateEndpoint("/d"); 273var endpoint5 = CreateEndpoint("/d"); 284var endpoint = CreateEndpoint("/a"); 285var dataSource = new TestGroupDataSource(new RouteEndpoint[] { endpoint }); 309var resolvedEndpoint = Assert.IsType<RouteEndpoint>(Assert.Single(groupedEndpoints)); 323var endpoint1 = CreateEndpoint("/a", metadata: endpointMetadata); 324var endpoint2 = CreateEndpoint("/b", metadata: endpointMetadata); 325var dataSource = new TestGroupDataSource(new RouteEndpoint[] { endpoint1, endpoint2 }); 358var endpoint = Assert.IsType<RouteEndpoint>(endpoint1); 365var endpoint = Assert.IsType<RouteEndpoint>(endpoint2); 375var endpoint1 = CreateEndpoint("/a"); 376var endpoint2 = CreateEndpoint("/b"); 377var dataSource = new TestGroupDataSource(new RouteEndpoint[] { endpoint1, endpoint2 }); 413var endpoint = Assert.IsType<RouteEndpoint>(endpoint1); 420var endpoint = Assert.IsType<RouteEndpoint>(endpoint2); 434var endpoint1 = CreateEndpoint("/a", metadata: endpointMetadata); 435var endpoint2 = CreateEndpoint("/b", metadata: endpointMetadata); 436var dataSource = new TestGroupDataSource(new RouteEndpoint[] { endpoint1, endpoint2 }); 479var endpoint = Assert.IsType<RouteEndpoint>(endpoint1); 486var endpoint = Assert.IsType<RouteEndpoint>(endpoint2); 493private RouteEndpoint CreateEndpoint(
DefaultLinkGeneratorProcessTemplateTest.cs (54)
19var endpoint = EndpointFactory.CreateRouteEndpoint("{p1}/{p2=a b}/{p3=foo}"); 43var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{*path}"); 75var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{**path}"); 98var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{**path}"); 121var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 144var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 167var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 190var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 213var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 236var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 259var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 288var endpoint = EndpointFactory.CreateRouteEndpoint("Foo/{bar=BAR}/{id?}"); 317var endpoint = EndpointFactory.CreateRouteEndpoint("Foo/{bar=MyBar}/{id?}", policies: new { bar = new SlugifyParameterTransformer(), }); 344var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 377var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 411var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 441var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 476var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 509var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 542var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 580var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 618var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}"); 648var endpoint = EndpointFactory.CreateRouteEndpoint( 672var endpoint = EndpointFactory.CreateRouteEndpoint( 698var endpoint = EndpointFactory.CreateRouteEndpoint( 722var endpoint = EndpointFactory.CreateRouteEndpoint( 759var endpoint = EndpointFactory.CreateRouteEndpoint( 790var endpoint = EndpointFactory.CreateRouteEndpoint( 824var endpoint = EndpointFactory.CreateRouteEndpoint( 856var endpoint = EndpointFactory.CreateRouteEndpoint( 888var endpoint = EndpointFactory.CreateRouteEndpoint( 922var endpoint = EndpointFactory.CreateRouteEndpoint( 948var endpoint = EndpointFactory.CreateRouteEndpoint( 974var endpoint = EndpointFactory.CreateRouteEndpoint( 1000var endpoint = EndpointFactory.CreateRouteEndpoint( 1026var endpoint = EndpointFactory.CreateRouteEndpoint( 1052var endpoint = EndpointFactory.CreateRouteEndpoint( 1080var endpoint = EndpointFactory.CreateRouteEndpoint( 1105var endpoint = EndpointFactory.CreateRouteEndpoint( 1131var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{name?}"); 1154var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{name?}"); 1177var endpoint = EndpointFactory.CreateRouteEndpoint( 1202var endpoint = EndpointFactory.CreateRouteEndpoint( 1227var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{name}"); 1250var endpoint = EndpointFactory.CreateRouteEndpoint( 1274var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/.{name?}"); 1296var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{name?}"); 1319var endpoint = EndpointFactory.CreateRouteEndpoint("a/{b=15}/{c?}/{d?}"); 1342var endpoint = EndpointFactory.CreateRouteEndpoint("a/{b=15}/{c?}"); 1365var endpoint = EndpointFactory.CreateRouteEndpoint("a/{b=15}/{c?}/{d?}"); 1466var endpoint = EndpointFactory.CreateRouteEndpoint( 1494var endpoint = EndpointFactory.CreateRouteEndpoint( 1522var endpoint = EndpointFactory.CreateRouteEndpoint( 1630var endpoint = EndpointFactory.CreateRouteEndpoint(
DefaultLinkGeneratorTest.cs (54)
21var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 36var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 51var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 66var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 81var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 82var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 97var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 98var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 113var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 114var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 133var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 134var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 153var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 154var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 172var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller:slugify}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 173var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller:slugify}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 198var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller:slugify}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 199var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller:slugify}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 225var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 226var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 245var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 246var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 266var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 267var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 291var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 292var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 311var endpoint = EndpointFactory.CreateRouteEndpoint("{controller:upper-case}/{name}", requiredValues: new { controller = "Home", name = "Test" }); 334var endpoint = EndpointFactory.CreateRouteEndpoint( 361var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 362var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 385var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 386var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 408var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 409var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 433var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 434var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 457var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 458var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 481var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 482var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 504var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 505var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new IntMetadata(1), }); 533var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", policies: new { controller = constraint }, metadata: new object[] { new IntMetadata(1), }); 567var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 585var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 591var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 608var endpointControllerAction = EndpointFactory.CreateRouteEndpoint( 613var endpointController = EndpointFactory.CreateRouteEndpoint( 618var endpointEmpty = EndpointFactory.CreateRouteEndpoint( 625var endpointControllerActionParameter = EndpointFactory.CreateRouteEndpoint( 661var homeIndex = EndpointFactory.CreateRouteEndpoint( 665var homeLogin = EndpointFactory.CreateRouteEndpoint( 700var homeIndex = EndpointFactory.CreateRouteEndpoint( 704var homeLogin = EndpointFactory.CreateRouteEndpoint(
DefaultLinkParserTest.cs (12)
23var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", displayName: "Test1", metadata: new object[] { new IntMetadata(1), }); 44var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", displayName: "Test1", metadata: new object[] { new IntMetadata(1), }); 45var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id2}", displayName: "Test2", metadata: new object[] { new IntMetadata(0), }); 67var endpoint0 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}", displayName: "Test1", metadata: new object[] { new IntMetadata(0), }); 68var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", displayName: "Test2", metadata: new object[] { new IntMetadata(0), }); 69var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id2}", displayName: "Test3", metadata: new object[] { new IntMetadata(0), }); 91var endpoint = EndpointFactory.CreateRouteEndpoint("{controller=Home}/{action=Index}/{id?}", metadata: new object[] { new IntMetadata(0), }); 106var endpoint0 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id:int}", metadata: new object[] { new IntMetadata(0), }); 107var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id2:alpha}", metadata: new object[] { new IntMetadata(0), }); 122var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 141var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), }); 147var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new IntMetadata(1), });
EndpointFactory.cs (2)
11public static RouteEndpoint CreateRouteEndpoint( 25public static RouteEndpoint CreateRouteEndpoint(
EndpointNameAddressSchemeTest.cs (9)
15var endpoint1 = EndpointFactory.CreateRouteEndpoint( 19var endpoint2 = EndpointFactory.CreateRouteEndpoint( 38var endpoint = EndpointFactory.CreateRouteEndpoint( 55var endpoint = EndpointFactory.CreateRouteEndpoint( 71var endpoint1 = EndpointFactory.CreateRouteEndpoint( 84var endpoint2 = EndpointFactory.CreateRouteEndpoint( 109var endpoint = EndpointFactory.CreateRouteEndpoint( 124var endpoint = EndpointFactory.CreateRouteEndpoint( 139var endpoint = EndpointFactory.CreateRouteEndpoint(
LinkGeneratorEndpointNameExtensionsTest.cs (10)
21var endpoint1 = EndpointFactory.CreateRouteEndpoint("some-endpoint/{p}", metadata: new[] { new EndpointNameMetadata("name1"), }); 22var endpoint2 = EndpointFactory.CreateRouteEndpoint("some#-other-endpoint/{p}", metadata: new[] { new EndpointNameMetadata("name2"), }); 48var endpoint1 = EndpointFactory.CreateRouteEndpoint("some-endpoint/{p}", metadata: new[] { new EndpointNameMetadata("name1"), }); 49var endpoint2 = EndpointFactory.CreateRouteEndpoint("some#-other-endpoint/{p}", metadata: new[] { new EndpointNameMetadata("name2"), }); 71var endpoint1 = EndpointFactory.CreateRouteEndpoint("some-endpoint/{p}", metadata: new[] { new EndpointNameMetadata("name1"), }); 72var endpoint2 = EndpointFactory.CreateRouteEndpoint("some#-other-endpoint/{p}", metadata: new[] { new EndpointNameMetadata("name2"), }); 97var endpoint1 = EndpointFactory.CreateRouteEndpoint("some-endpoint/{p}", metadata: new[] { new EndpointNameMetadata("name1"), }); 98var endpoint2 = EndpointFactory.CreateRouteEndpoint("some#-other-endpoint/{p}", metadata: new[] { new EndpointNameMetadata("name2"), }); 122var endpoint1 = EndpointFactory.CreateRouteEndpoint("some-endpoint/{p}", metadata: new[] { new EndpointNameMetadata("name1"), }); 123var endpoint2 = EndpointFactory.CreateRouteEndpoint("some#-other-endpoint/{p}", metadata: new[] { new EndpointNameMetadata("name2"), });
LinkGeneratorRouteValuesAddressExtensionsTest.cs (12)
21var endpoint1 = EndpointFactory.CreateRouteEndpoint( 25var endpoint2 = EndpointFactory.CreateRouteEndpoint( 52var endpoint1 = EndpointFactory.CreateRouteEndpoint( 56var endpoint2 = EndpointFactory.CreateRouteEndpoint( 79var endpoint1 = EndpointFactory.CreateRouteEndpoint( 83var endpoint2 = EndpointFactory.CreateRouteEndpoint( 109var endpoint1 = EndpointFactory.CreateRouteEndpoint( 113var endpoint2 = EndpointFactory.CreateRouteEndpoint( 138var endpoint1 = EndpointFactory.CreateRouteEndpoint( 142var endpoint2 = EndpointFactory.CreateRouteEndpoint( 170var endpoint1 = EndpointFactory.CreateRouteEndpoint( 174var endpoint2 = EndpointFactory.CreateRouteEndpoint(
LinkParserEndpointNameExtensionsTest.cs (4)
14var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id?}", metadata: new object[] { new EndpointNameMetadata("Test2"), }); 29var endpoint1 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new EndpointNameMetadata("Test2"), }); 30var endpoint2 = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id2}", metadata: new object[] { new EndpointNameMetadata("Test"), }); 45var endpoint = EndpointFactory.CreateRouteEndpoint("{controller}/{action}/{id}", metadata: new object[] { new EndpointNameMetadata("Test"), });
MatcherPolicyTest.cs (1)
60private RouteEndpoint CreateEndpoint(string template, params object[] metadata)
Matching\AcceptsMatcherPolicyTest.cs (1)
598private static RouteEndpoint CreateEndpoint(string template, AcceptsMetadata consumesMetadata, params object[] more)
Matching\BarebonesMatcher.cs (2)
39public readonly RouteEndpoint Endpoint; 44public InnerMatcher(string[] segments, RouteEndpoint endpoint)
Matching\BarebonesMatcherBuilder.cs (4)
11private readonly List<RouteEndpoint> _endpoints = new List<RouteEndpoint>(); 13public override void AddEndpoint(RouteEndpoint endpoint) 23var endpoint = _endpoints[i];
Matching\BarebonesMatcherConformanceTest.cs (1)
45internal override Matcher CreateMatcher(params RouteEndpoint[] endpoints)
Matching\CandidateSetTest.cs (15)
18var endpoints = new RouteEndpoint[count]; 49var endpoints = new RouteEndpoint[count]; 64var endpoint = CreateEndpoint($"/test{i}"); 82var endpoints = new RouteEndpoint[count]; 112var endpoints = new RouteEndpoint[count]; 148var endpoints = new RouteEndpoint[count]; 159var replacements = new RouteEndpoint[3] 198var endpoints = new RouteEndpoint[count]; 209var replacements = new RouteEndpoint[3] 255var endpoints = new RouteEndpoint[count]; 266var replacements = new RouteEndpoint[3] 305var endpoints = new RouteEndpoint[count]; 337var endpoints = new RouteEndpoint[count]; 370private RouteEndpoint CreateEndpoint(string template, int order = 0, params object[] metadata) 379return (RouteEndpoint)builder.Build();
Matching\DataSourceDependentMatcherTest.cs (8)
37var endpoint = new RouteEndpoint( 62var endpoint = new RouteEndpoint( 102var endpoint = new RouteEndpoint( 124var endpoint = new RouteEndpoint( 240private List<RouteEndpoint> Endpoints { get; } = new List<RouteEndpoint>(); 242public override void AddEndpoint(RouteEndpoint endpoint) 255public IReadOnlyList<RouteEndpoint> Endpoints { get; set; }
Matching\DefaultEndpointSelectorTest.cs (9)
15var endpoints = new RouteEndpoint[] { }; 33var endpoints = new RouteEndpoint[] { CreateEndpoint("/test"), }; 54var endpoints = new RouteEndpoint[] { CreateEndpoint("/test"), }; 75var endpoints = new RouteEndpoint[] { CreateEndpoint("/test1"), CreateEndpoint("/test2"), }; 96var endpoints = new RouteEndpoint[] { CreateEndpoint("/test1"), CreateEndpoint("/test2"), CreateEndpoint("/test3"), }; 118var endpoints = new RouteEndpoint[] 149var endpoints = new RouteEndpoint[] { CreateEndpoint("/test1"), CreateEndpoint("/test2"), CreateEndpoint("/test3"), }; 175private static RouteEndpoint CreateEndpoint(string template) 185private static CandidateSet CreateCandidateSet(RouteEndpoint[] endpoints, int[] scores)
Matching\DfaMatcherBuilderTest.cs (97)
23var endpoint = CreateEndpoint("/"); 41var endpoint = CreateEndpoint("a/b/c"); 80var endpoint = CreateEndpoint("{a}/{b}/{c}"); 110var endpoint = CreateEndpoint("{a}/{*b}"); 142var endpoint = CreateEndpoint("{*a}"); 166var endpoint1 = CreateEndpoint("a/b1/c"); 169var endpoint2 = CreateEndpoint("a/b2/c"); 218var endpoint1 = CreateEndpoint("a/b1/c"); 221var endpoint2 = CreateEndpoint("A/b2/c"); 270var endpoint1 = CreateEndpoint("a/b/c"); 273var endpoint2 = CreateEndpoint("a/{b}/c"); 326var endpoint1 = CreateEndpoint("a/{b1}/c"); 329var endpoint2 = CreateEndpoint("a/{b2}/c"); 368var endpoint1 = CreateEndpoint("a/b/c"); 371var endpoint2 = CreateEndpoint("a/{*b}"); 417var endpoint1 = CreateEndpoint("a/{b}/c"); 420var endpoint2 = CreateEndpoint("a/{*b}"); 464var endpoint1 = CreateEndpoint("a/c"); 467var endpoint2 = CreateEndpoint("{a:length(2)}/b/c"); 511var endpoint1 = CreateEndpoint(candidate); 514var endpoint2 = CreateEndpoint("{a:int:length(2)}/b/c"); 556var endpoint1 = CreateEndpoint("aa/c"); 559var endpoint2 = CreateEndpoint("{a:length(2)}/b/c"); 616var endpoint1 = CreateEndpoint("aa/b/c"); 619var endpoint2 = CreateEndpoint("{a:length(2)}/b/c"); 622var endpoint3 = CreateEndpoint("aa/c"); 679var endpoint1 = CreateEndpoint("a/c"); 682var endpoint2 = CreateEndpoint("a{value}/b/c"); 724var endpoint1 = CreateEndpoint("aa/c"); 727var endpoint2 = CreateEndpoint("a{value}/b/c"); 784var endpoint1 = CreateEndpoint("aa/c"); 787var endpoint2 = CreateEndpoint("a{value:int}/b/c"); 829var endpoint1 = CreateEndpoint("a1/c"); 832var endpoint2 = CreateEndpoint("a{value:int}/b/c"); 889var endpoint1 = CreateEndpoint("a-11-b-true/c"); 892var endpoint2 = CreateEndpoint("a-{value:int:length(2)}-b-{other:bool}/b/c"); 952var endpoint1 = CreateEndpoint(candidate); 955var endpoint2 = CreateEndpoint("a-{value:int:length(3)}-b-{other:bool}/b/c"); 1001var endpoint1 = CreateEndpoint("aa/b/c"); 1004var endpoint2 = CreateEndpoint("a{value}/b/c"); 1007var endpoint3 = CreateEndpoint("aa/c"); 1635foreach (var endpoint in endpoints) 2155foreach (var endpoint in endpoints) 2373foreach (var endpoint in endpoints) 2399var endpoint1 = CreateEndpoint("a/{b}", order: 0); 2402var endpoint2 = CreateEndpoint("a/{*b}", order: 1); 2442var endpoint1 = CreateEndpoint("a/{*b}", order: 0); 2445var endpoint2 = CreateEndpoint("a/{b}", order: 1); 2485var endpoint1 = CreateEndpoint("{a}/{b}", order: 0); 2488var endpoint2 = CreateEndpoint("a/{*b}", order: 1); 2539var endpoint1 = CreateEndpoint("a/{*b}", order: 0); 2542var endpoint2 = CreateEndpoint("{a}/{b}", order: 1); 2589var endpoint1 = CreateEndpoint("a/{*b}", order: 0); 2592var endpoint2 = CreateEndpoint("{a}/{b}", order: 1); 2633var endpoint1 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata1(0), new TestMetadata2(true), }); 2672var endpoint1 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata1(0), new TestMetadata2(true), }); 2675var endpoint2 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata1(1), new TestMetadata2(true), }); 2678var endpoint3 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata1(1), new TestMetadata2(false), }); 2736var endpoint1 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata2(true), }); 2739var endpoint2 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata2(true), }); 2742var endpoint3 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata2(false), }); 2780var endpoint1 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata1(0), }); 2783var endpoint2 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata1(1), }); 2786var endpoint3 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata1(1), }); 2824var endpoint1 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata1(0), }); 2827var endpoint2 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata1(1), }); 2830var endpoint3 = CreateEndpoint("/a", metadata: new object[] { new TestMetadata1(1), }); 2872var endpoint1 = CreateEndpoint("/a", metadata: new object[] { }); 2875var endpoint2 = CreateEndpoint("/a", metadata: new object[] { }); 2878var endpoint3 = CreateEndpoint("/a", metadata: new object[] { }); 2922var endpoint1 = CreateEndpoint("/a/{**b}", order: -1, metadata: new object[] { new TestMetadata1(0), new TestMetadata2(true), }); 2925var endpoint2 = CreateEndpoint("/a/{b}/{**c}", order: 0, metadata: new object[] { new TestMetadata1(1), new TestMetadata2(true), }); 2928var endpoint3 = CreateEndpoint("/a/b/{c}", order: 1, metadata: new object[] { new TestMetadata1(1), new TestMetadata2(false), }); 2947var endpoint = CreateEndpoint("{controller}/{action}", requiredValues: new { controller = "Home", action = "Index" }); 2978var endpoint = CreateEndpoint( 3012var endpoint = CreateSubsitutedEndpoint( 3046var endpoint1 = CreateSubsitutedEndpoint( 3052var endpoint2 = CreateSubsitutedEndpoint( 3058var endpoint3 = CreateSubsitutedEndpoint( 3118var endpoint = CreateEndpoint( 3152var endpoint = CreateEndpoint( 3192var endpoint = CreateEndpoint("/a/b/c"); 3212var endpoint = CreateEndpoint("/{a}/{b}/{c}"); 3236var endpoint = CreateEndpoint("/{a=aa}/{b=bb}/{c=cc}"); 3266var endpoint = CreateEndpoint("/{a}/{b}/{*c=cc}"); 3298var endpoint = CreateEndpoint("/{a}/{b}/{c=cc}", new { a = "aa", d = "dd", }); 3329var endpoint = CreateEndpoint("/{a}-{b=bb}/{c}"); 3360var endpoint = CreateEndpoint("/a/b/c", constraints: new { a = new IntRouteConstraint(), }); 3380var endpoint1 = CreateEndpoint("/a/b/{c:int}"); 3381var endpoint2 = CreateEndpoint("/d/e/{f:int}"); 3403var endpoint1 = CreateEndpoint("/a/b/{c:regex([A-Z])}"); 3404var endpoint2 = CreateEndpoint("/d/e/{f:regex([A-Z])}"); 3426var endpoint1 = CreateEndpoint("/a/b/{c:regex([A-Z])}"); 3427var endpoint2 = CreateEndpoint("/d/e/{f:regex([a-z])}"); 3449var endpoint = CreateEndpoint("/a/b/c", constraints: new { a = new CustomParameterPolicy(), }); 3510private static RouteEndpoint CreateSubsitutedEndpoint( 3558private static RouteEndpoint CreateEndpoint(
Matching\DfaMatcherConformanceTest.cs (4)
33var endpoints = new RouteEndpoint[] 45var expected = endpoints[endpointIndex]; 57internal override Matcher CreateMatcher(params RouteEndpoint[] endpoints) 62internal Matcher CreateMatcherCore(params RouteEndpoint[] endpoints)
Matching\DfaMatcherTest.cs (35)
18private RouteEndpoint CreateEndpoint(string template, int order, object defaults = null, object requiredValues = null, object policies = null) 136var endpoint = CreateEndpoint( 175var endpoint = CreateEndpoint( 201var endpoint = CreateEndpoint( 250var endpoint = CreateEndpoint( 280var endpoint1 = CreateEndpoint( 284var endpoint2 = CreateEndpoint( 319var endpoint = CreateEndpoint( 358var endpoint1 = CreateEndpoint("a/c", 0); 359var endpoint2 = CreateEndpoint("{param:length(2)}/b/c", 0); 385var endpoint1 = CreateEndpoint("a/c", 0); 386var endpoint2 = CreateEndpoint("{param:length(2)}/b/c", 0); 412var endpoint1 = CreateEndpoint("a/b/c", 0); 413var endpoint2 = CreateEndpoint("{param:length(2)}/b/c", 0); 439var endpoint1 = CreateEndpoint("aa/b/c", 0); 440var endpoint2 = CreateEndpoint("{param:length(2)}/b/c", 0); 457Assert.Equal(endpoints.ToArray(), set.candidates.Select(e => e.Endpoint).OrderBy(e => ((RouteEndpoint)e).RoutePattern.RawText).ToArray()); 464var endpoint1 = CreateEndpoint("a/b/c", 0); 465var endpoint2 = CreateEndpoint("a/{param:length(2)}/c", 0); 490var endpoint1 = CreateEndpoint("a/b/d", 0); 491var endpoint2 = CreateEndpoint("a/{param:length(2)}/c", 0); 517var endpoint1 = CreateEndpoint("a/b/c", 0); 518var endpoint2 = CreateEndpoint("a/{param:length(2)}/c", 0); 544var endpoint1 = CreateEndpoint("a/bb/c", 0); 545var endpoint2 = CreateEndpoint("a/{param:length(2)}/c", 0); 562Assert.Equal(endpoints.ToArray(), set.candidates.Select(e => e.Endpoint).OrderBy(e => ((RouteEndpoint)e).RoutePattern.RawText).ToArray()); 579var endpoint = CreateEndpoint( 618var higherOrderEndpoint = CreateEndpoint("/Teams", 1); 619var lowerOrderEndpoint = CreateEndpoint("/Teams", 0); 643var endpoint1 = CreateEndpoint("/Teams", 0); 644var endpoint2 = CreateEndpoint("/Teams", 1); 689var endpoint1 = CreateEndpoint("/Teams/{x?}", 0); 690var endpoint2 = CreateEndpoint("/Teams/{x?}", 1); 736var endpoint1 = CreateEndpoint("/Teams", 0, policies: new { x = constraint, }); 737var endpoint2 = CreateEndpoint("/Teams", 1, policies: new { x = constraint, });
Matching\EndpointComparerTest.cs (35)
15var endpoint1 = CreateEndpoint("/", order: 1); 16var endpoint2 = CreateEndpoint("/api/foo", order: -1); 31var endpoint1 = CreateEndpoint("/api/foo", order: 1); 32var endpoint2 = CreateEndpoint("/", order: 1); 47var endpoint1 = CreateEndpoint("/", order: 1, new TestMetadata1()); 48var endpoint2 = CreateEndpoint("/", order: 1); 63var endpoint1 = CreateEndpoint("/", order: 1, new TestMetadata1()); 64var endpoint2 = CreateEndpoint("/", order: 1, new TestMetadata1(), new TestMetadata2()); 79var endpoint1 = CreateEndpoint("/foo", order: 1, new TestMetadata1()); 80var endpoint2 = CreateEndpoint("/bar", order: 1, new TestMetadata1()); 95var endpoint1 = CreateEndpoint("/foo", order: 1, new TestMetadata1()); 96var endpoint2 = CreateEndpoint("/foo", order: 1, new TestMetadata1()); 111var endpoint1 = CreateEndpoint("/", order: 1); 112var endpoint2 = CreateEndpoint("/api/foo", order: -1); 127var endpoint1 = CreateEndpoint("/api/foo", order: 1); 128var endpoint2 = CreateEndpoint("/", order: 1); 143var endpoint1 = CreateEndpoint("/", order: 1, new TestMetadata1()); 144var endpoint2 = CreateEndpoint("/", order: 1); 159var endpoint1 = CreateEndpoint("/", order: 1, new TestMetadata1()); 160var endpoint2 = CreateEndpoint("/", order: 1, new TestMetadata1(), new TestMetadata2()); 175var endpoint1 = CreateEndpoint("/foo", order: 1, new TestMetadata1()); 176var endpoint2 = CreateEndpoint("/bar", order: 1, new TestMetadata1()); 191var endpoint1 = CreateEndpoint("/foo", order: -1); 192var endpoint2 = CreateEndpoint("/bar/{baz}", order: -1); 193var endpoint3 = CreateEndpoint("/bar", order: 0, new TestMetadata1()); 194var endpoint4 = CreateEndpoint("/foo", order: 0, new TestMetadata2()); 195var endpoint5 = CreateEndpoint("/foo", order: 0); 196var endpoint6 = CreateEndpoint("/a{baz}", order: 0, new TestMetadata1(), new TestMetadata2()); 197var endpoint7 = CreateEndpoint("/bar{baz}", order: 0, new TestMetadata1(), new TestMetadata2()); 200var list = new List<RouteEndpoint>() { endpoint7, endpoint6, endpoint5, endpoint4, endpoint3, endpoint2, endpoint1, }; 223var endpoint1 = CreateEndpoint("/I", order: 0); 224var endpoint2 = CreateEndpoint("/i", order: 0); 225var endpoint3 = CreateEndpoint("/\u0131", order: 0); // Turkish lowercase i 227var list = new List<RouteEndpoint>() { endpoint1, endpoint2, endpoint3 }; 242private static RouteEndpoint CreateEndpoint(string template, int order, params object[] metadata)
Matching\FullFeaturedMatcherConformanceTest.cs (11)
39var endpoint = CreateEndpoint("/a/{b}/{c}", new { b = "17", c = "18", }); 54var endpoint = CreateEndpoint("/a/{b}/{c}", new { b = "17", c = "18", d = "19" }); 339var expected = CreateEndpoint(template1); 340var other = CreateEndpoint(template2); 373var expected = CreateEndpoint(template1, order: 0); 374var other = CreateEndpoint(template2, order: 1); 429var expected = endpoints[Array.IndexOf(templates, expectedTemplate)]; 445var endpoints = new RouteEndpoint[] 459var expected = endpoints[0]; 475var endpoints = new RouteEndpoint[] 490var expected = endpoints[1];
Matching\HostMatcherPolicyIntegrationTestBase.cs (26)
19var endpoint = CreateEndpoint("/hello", hosts: new string[] { "contoso.com", }); 35var endpoint = CreateEndpoint("/hello", hosts: new string[] { "contoso.com:8080", }); 51var endpoint = CreateEndpoint("/hello", hosts: new string[] { "æon.contoso.com", }); 67var endpoint = CreateEndpoint("/hello", hosts: new string[] { "contoso.com:8080", }); 83var endpoint = CreateEndpoint("/hello", hosts: new string[] { "contoso.com:8080", }); 99var endpoint = CreateEndpoint("/hello", hosts: new string[] { "*.contoso.com:8080", }); 115var endpoint = CreateEndpoint("/hello", hosts: new string[] { "*.contoso.com:8080", }); 131var endpoint = CreateEndpoint("/hello", hosts: new string[] { "*.contoso.com:8080", }); 147var endpoint = CreateEndpoint("/hello", hosts: new string[] { "*.contoso.com:8080", }); 163var endpoint = CreateEndpoint("/hello", hosts: new string[] { "*.contoso.com:8080", }); 179var endpoint = CreateEndpoint("/hello", hosts: new string[] { "contoso.com:8080", "*.contoso.com:8080", }); 195var endpoint = CreateEndpoint("/hello", hosts: new string[] { "Contoso.COM", }); 211var endpoint = CreateEndpoint("/hello", hosts: new string[] { "contoso.com:80", }); 227var endpoint = CreateEndpoint("/hello", hosts: new string[] { "contoso.com:443", }); 243var endpoint = CreateEndpoint("/hello", hosts: new string[] { "contoso.com:443", }); 259var endpoint = CreateEndpoint("/hello", hosts: new string[] { "*:443", }); 275var endpoint = CreateEndpoint("/hello"); 291var endpoint = CreateEndpoint("/hello", hosts: new string[] { }); 307var endpoint = CreateEndpoint("/hello", hosts: new string[] { "*", }); 323var endpoint = CreateEndpoint("/hello", hosts: new string[] { "*:*", }); 339var endpoint = CreateEndpoint("/{**path}", hosts: new string[] { "contoso.com", }); 355var endpoint = CreateEndpoint("/{**path}", hosts: new string[] { "contoso.com", }); 367private static Matcher CreateMatcher(params RouteEndpoint[] endpoints) 400internal RouteEndpoint CreateEndpoint( 427internal (Matcher matcher, RouteEndpoint endpoint) CreateMatcher(string template) 429var endpoint = CreateEndpoint(template);
Matching\HostMatcherPolicyTest.cs (1)
258private static RouteEndpoint CreateEndpoint(string template, IHostMetadata hostMetadata, params object[] more)
Matching\HttpMethodMatcherPolicyIntegrationTestBase.cs (30)
21var endpoint = CreateEndpoint("/hello", httpMethods: new string[] { "GET", }); 37var endpoint = CreateEndpoint("/hello", httpMethods: new string[] { "GET", }, acceptCorsPreflight: true); 53var endpoint = CreateEndpoint("/hello", httpMethods: new string[] { "GET", }, acceptCorsPreflight: true); 69var endpoint = CreateEndpoint("/hello", httpMethods: new string[] { "GET", }, acceptCorsPreflight: false); 88var endpoint = CreateEndpoint("/hello", httpMethods: new string[] { endpointMethod, }); 106var endpoint = CreateEndpoint("/hello", httpMethods: new string[] { endpointMethod, }, acceptCorsPreflight: true); 122var endpoint = CreateEndpoint("/hello"); 138var endpoint = CreateEndpoint("/hello", acceptCorsPreflight: true); 154var endpoint = CreateEndpoint("/hello", acceptCorsPreflight: false); 170var endpoint = CreateEndpoint("/hello", httpMethods: new string[] { }); 186var endpoint1 = CreateEndpoint("/hello", httpMethods: new string[] { "GET", "PUT" }); 187var endpoint2 = CreateEndpoint("/hello", httpMethods: new string[] { "DELETE" }); 211var endpoint1 = CreateEndpoint("/hello", httpMethods: new string[] { "GET", "PUT" }, acceptCorsPreflight: true); 212var endpoint2 = CreateEndpoint("/hello", httpMethods: new string[] { "DELETE" }); 228var endpoint1 = CreateEndpoint("/{x:int}", httpMethods: new string[] { }); 229var endpoint2 = CreateEndpoint("/{hello:regex(hello)}", httpMethods: new string[] { "DELETE" }); 245var endpoint1 = CreateEndpoint("/hello", httpMethods: new string[] { "GET", }); 246var endpoint2 = CreateEndpoint("/bar"); 262var endpoint1 = CreateEndpoint("/hello", httpMethods: new string[] { "GET", }); 263var endpoint2 = CreateEndpoint("/bar", httpMethods: new string[] { }); 279var endpoint1 = CreateEndpoint("/{x}", httpMethods: new string[] { "GET", }); 280var endpoint2 = CreateEndpoint("/{x}", httpMethods: new string[] { }); 296var endpoint1 = CreateEndpoint("/hello", httpMethods: new string[] { "GET", "PUT" }); 297var endpoint2 = CreateEndpoint("/hello", httpMethods: new string[] { "DELETE" }); 326var endpoint1 = CreateEndpoint("/hello", httpMethods: new string[] { "GET", }); 327var endpoint2 = CreateEndpoint("/hello", httpMethods: new string[] { "GOT", }); 346private static Matcher CreateMatcher(params RouteEndpoint[] endpoints) 381internal RouteEndpoint CreateEndpoint( 409internal (Matcher matcher, RouteEndpoint endpoint) CreateMatcher(string template) 411var endpoint = CreateEndpoint(template);
Matching\HttpMethodMatcherPolicyTest.cs (2)
161var endpoints = new RouteEndpoint[candidateNum]; 388private static RouteEndpoint CreateEndpoint(string template, HttpMethodMetadata httpMethodMetadata, params object[] more)
Matching\MatcherConformanceTest.cs (4)
12internal abstract Matcher CreateMatcher(params RouteEndpoint[] endpoints); 31internal static RouteEndpoint CreateEndpoint( 45internal (Matcher matcher, RouteEndpoint endpoint) CreateMatcher(string template) 47var endpoint = CreateEndpoint(template);
Matching\RouteMatcherBuilder.cs (6)
15private readonly List<RouteEndpoint> _endpoints; 22_endpoints = new List<RouteEndpoint>(); 25public override void AddEndpoint(RouteEndpoint endpoint) 44var endpoint = group.First(); 77private readonly RouteEndpoint[] _candidates; 81public SelectorRouter(EndpointSelector selector, RouteEndpoint[] candidates)
Matching\RouteMatcherConformanceTest.cs (3)
17var endpoints = new RouteEndpoint[] 29var expected = endpoints[endpointIndex]; 41internal override Matcher CreateMatcher(params RouteEndpoint[] endpoints)
Matching\TreeRouterMatcherBuilder.cs (6)
17private readonly List<RouteEndpoint> _endpoints; 21_endpoints = new List<RouteEndpoint>(); 24public override void AddEndpoint(RouteEndpoint endpoint) 55var endpoint = group.First(); 79private readonly RouteEndpoint[] _candidates; 83public SelectorRouter(EndpointSelector selector, RouteEndpoint[] candidates)
Matching\TreeRouterMatcherConformanceTest.cs (3)
31var endpoints = new RouteEndpoint[] 43var expected = endpoints[endpointIndex]; 55internal override Matcher CreateMatcher(params RouteEndpoint[] endpoints)
RouteEndpointBuilderTest.cs (12)
40var endpoint = Assert.IsType<RouteEndpoint>(builder.Build()); 62var endpoint = Assert.IsType<RouteEndpoint>(builder.Build()); 92var endpoint = Assert.IsType<RouteEndpoint>(builder.Build()); 112var endpoint = Assert.IsType<RouteEndpoint>(builder.Build()); 133var endpoint = Assert.IsType<RouteEndpoint>(builder.Build()); 167var endpoint = Assert.IsType<RouteEndpoint>(builder.Build());
RouteValuesAddressSchemeTest.cs (41)
16var endpoint1 = CreateEndpoint("/a", routeName: "other"); 17var endpoint2 = CreateEndpoint("/a", routeName: "named"); 27var actual = Assert.IsType<RouteEndpoint>(namedMatch.Match.Entry.Data); 35var endpoint1 = CreateEndpoint("/a", routeName: "other"); 36var endpoint2 = CreateEndpoint("/a", routeName: "named"); 37var endpoint3 = CreateEndpoint("/b", routeName: "named"); 47Assert.Same(endpoint2, Assert.IsType<RouteEndpoint>(namedMatches[0].Match.Entry.Data)); 48Assert.Same(endpoint3, Assert.IsType<RouteEndpoint>(namedMatches[1].Match.Entry.Data)); 55var endpoint1 = CreateEndpoint("/a", routeName: "other"); 56var endpoint2 = CreateEndpoint("/a", routeName: "named"); 57var endpoint3 = CreateEndpoint("/b", routeName: "NaMed"); 67Assert.Same(endpoint2, Assert.IsType<RouteEndpoint>(namedMatches[0].Match.Entry.Data)); 68Assert.Same(endpoint3, Assert.IsType<RouteEndpoint>(namedMatches[1].Match.Entry.Data)); 75var endpoint1 = CreateEndpoint("/a", routeName: "a"); 88var actual = Assert.IsType<RouteEndpoint>(match.Entry.Data); 92var endpoint2 = CreateEndpoint("/b", routeName: "b"); 103var endpoint3 = CreateEndpoint("/c", routeName: "c"); 114var endpoint4 = CreateEndpoint("/d", routeName: "d"); 131actual = Assert.IsType<RouteEndpoint>(m.Entry.Data); 136actual = Assert.IsType<RouteEndpoint>(m.Entry.Data); 141actual = Assert.IsType<RouteEndpoint>(m.Entry.Data); 146actual = Assert.IsType<RouteEndpoint>(m.Entry.Data); 155var endpoint1 = CreateEndpoint( 159var endpoint2 = CreateEndpoint( 181var endpoint1 = CreateEndpoint( 185var endpoint2 = CreateEndpoint( 207var endpoint1 = CreateEndpoint( 211var endpoint2 = CreateEndpoint( 215var endpoint3 = CreateEndpoint( 239var endpoint1 = CreateEndpoint( 243var endpoint2 = CreateEndpoint("test"); 264var expected = CreateEndpoint( 289var expected = CreateEndpoint( 316var expected = CreateEndpoint( 341var endpoint = CreateEndpoint( 364var endpoint = CreateEndpoint( 384var endpoint = CreateEndpoint( 403var endpoint = EndpointFactory.CreateRouteEndpoint( 425private RouteEndpoint CreateEndpoint(
Microsoft.AspNetCore.StaticFiles (4)
StaticFilesEndpointRouteBuilderExtensions.cs (4)
23/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 60/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 96/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match 139/// Adds a specialized <see cref="RouteEndpoint"/> to the <see cref="IEndpointRouteBuilder"/> that will match
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
1599var newRouteEndpoint = Assert.IsType<RouteEndpoint>(newEndpoint);
RoutingSandbox (2)
UseEndpointRoutingStartup.cs (2)
39foreach (var endpoint in dataSource.Endpoints.OfType<RouteEndpoint>().OrderBy(e => e.RoutePattern.RawText, StringComparer.OrdinalIgnoreCase))
RoutingWebSite (2)
UseEndpointRoutingStartup.cs (2)
45foreach (var endpoint in dataSource.Endpoints.OfType<RouteEndpoint>().OrderBy(e => e.RoutePattern.RawText, StringComparer.OrdinalIgnoreCase))