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