400 references to RoutePatternFactory
Benchmarks (1)
StartupUsingEndpointRouting.cs (1)
36
routePattern:
RoutePatternFactory
.Parse("/plaintext"),
DeveloperExceptionPageSample (1)
Startup.cs (1)
27
RoutePatternFactory
.Parse("/"),
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
155
routePattern =
RoutePatternFactory
.Parse(token.ValueText);
Microsoft.AspNetCore.Authorization.Test (10)
AuthorizationEndpointConventionBuilderExtensionsTests.cs (10)
25
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
43
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
62
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
81
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
100
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
133
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
156
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
182
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
208
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
232
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
Microsoft.AspNetCore.Components.Endpoints (8)
Builder\OpaqueRedirection.cs (1)
55
RoutePatternFactory
.Parse($"/{RedirectionEndpointBaseRelativeUrl}"),
Builder\RazorComponentEndpointFactory.cs (1)
35
RoutePatternFactory
.Parse(pageDefinition.Route),
Builder\ResourceCollectionUrlEndpoint.cs (6)
251
RoutePatternFactory
.Parse(fingerprintedGzResourceCollectionUrl),
256
RoutePatternFactory
.Parse(fingerprintedResourceCollectionUrl),
261
RoutePatternFactory
.Parse(fingerprintedResourceCollectionUrl),
268
RoutePatternFactory
.Parse(gzResourceCollectionUrl),
273
RoutePatternFactory
.Parse(resourceCollectionUrl),
278
RoutePatternFactory
.Parse(resourceCollectionUrl),
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
HotReloadServiceTests.cs (1)
267
RoutePatternFactory
.Parse("/server"),
RazorComponentEndpointDataSourceTest.cs (2)
270
RoutePatternFactory
.Parse("/server"),
283
RoutePatternFactory
.Parse("/webassembly"),
RazorComponentEndpointInvokerTest.cs (1)
36
RoutePatternFactory
.Parse("/"),
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (12)
Logging\HttpUtilityExtensionsTests.cs (2)
42
RoutePatternFactory
.Parse(httpRoute),
71
RoutePatternFactory
.Pattern(),
Logging\IncomingHttpRouteUtilityTests.cs (10)
46
RoutePatternFactory
.Parse(httpRoute),
84
RoutePatternFactory
.Parse(httpRoute),
124
RoutePatternFactory
.Parse(httpRoute),
166
RoutePatternFactory
.Parse(httpRoute),
208
RoutePatternFactory
.Parse(httpRoute),
255
RoutePatternFactory
.Parse(httpRoute),
296
RoutePatternFactory
.Parse(httpRoute),
344
RoutePatternFactory
.Parse(httpRoute),
389
RoutePatternFactory
.Parse(httpRoute),
427
RoutePatternFactory
.Parse(httpRoute),
Microsoft.AspNetCore.Diagnostics.Tests (3)
ExceptionHandlerMiddlewareTest.cs (3)
301
var originalEndpointBuilder = new RouteEndpointBuilder(c => Task.CompletedTask,
RoutePatternFactory
.Parse("/path"), 0);
361
var originalEndpointBuilder = new RouteEndpointBuilder(c => Task.CompletedTask,
RoutePatternFactory
.Parse("/path"), 0);
364
var newEndpointBuilder = new RouteEndpointBuilder(c => Task.CompletedTask,
RoutePatternFactory
.Parse("/new"), 0);
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\Binding\JsonTranscodingProviderServiceBinder.cs (1)
234
return (
RoutePatternFactory
.Parse(adapter.ResolvedRouteTemplate), CreateDescriptorInfo(body, responseBody, methodDescriptor, adapter));
Microsoft.AspNetCore.Http.Extensions.Tests (4)
RequestDelegateFactoryTests.cs (4)
2842
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/test/pattern"), order: 0);
3078
EndpointBuilder = new RouteEndpointBuilder(null,
RoutePatternFactory
.Parse("/"), order: 0),
3274
var builder = new RouteEndpointBuilder(null,
RoutePatternFactory
.Parse("/"), 0);
3284
var builder = new RouteEndpointBuilder(null,
RoutePatternFactory
.Parse("/"), 0);
Microsoft.AspNetCore.Http.Results.Tests (54)
AcceptedAtRouteOfTResultTests.cs (2)
127
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
154
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<AcceptedAtRoute<object>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
AcceptedAtRouteResultTests.cs (2)
81
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
107
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<AcceptedAtRoute>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
AcceptedOfTResultTests.cs (2)
68
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
95
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Accepted<object>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
AcceptedResultTests.cs (2)
38
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
64
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Accepted>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
BadRequestOfTResultTests.cs (2)
111
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
138
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<BadRequest<object>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
BadRequestResultTests.cs (2)
51
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
77
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<BadRequest>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
ConflictOfTResultTests.cs (2)
89
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
116
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Conflict<object>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
ConflictResultTests.cs (2)
52
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
78
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Conflict>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
CreatedAtRouteOfTResultTests.cs (2)
97
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
124
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<CreatedAtRoute<object>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
CreatedAtRouteResultTests.cs (2)
79
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
105
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<CreatedAtRoute>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
CreatedOfTResultTests.cs (2)
103
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
130
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Created<object>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
CreatedResultTests.cs (2)
69
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
95
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Created>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
InternalServerErrorOfTResultTests.cs (2)
111
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
138
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<InternalServerError<object>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
InternalServerErrorResultTests.cs (2)
51
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
77
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<InternalServerError>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
NoContentResultTests.cs (2)
48
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
74
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<NoContent>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
NotFoundOfTResultTests.cs (2)
71
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
98
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<NotFound<object>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
NotFoundResultTests.cs (2)
47
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
73
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<NotFound>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
OkOfTResultTests.cs (2)
88
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
115
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Ok<object>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
OkResultTests.cs (2)
50
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
76
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Ok>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
ResultsOfTTests.Generated.cs (10)
209
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
223
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
488
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
503
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
844
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
860
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3, ProvidesMetadataResult4>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
1285
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
1302
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3, ProvidesMetadataResult4, ProvidesMetadataResult5>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
1819
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
1837
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3, ProvidesMetadataResult4, ProvidesMetadataResult5, ProvidesMetadataResult6>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
UnprocessableEntityOfTResultTests.cs (2)
88
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
115
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<UnprocessableEntity<object>>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
UnprocessableEntityResultTests.cs (2)
51
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
77
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<UnprocessableEntity>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
ValidationProblemResultTests.cs (2)
99
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
126
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<ValidationProblem>(null, new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0)));
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
EndpointMetadataApiDescriptionProviderTest.cs (1)
1553
var routePattern =
RoutePatternFactory
.Parse(pattern ?? "/");
Microsoft.AspNetCore.Mvc.Core (6)
Routing\ActionEndpointFactory.cs (5)
99
updatedRoutePattern =
RoutePatternFactory
.Combine(groupPrefix, updatedRoutePattern);
130
var attributeRoutePattern =
RoutePatternFactory
.Parse(action.AttributeRouteInfo.Template);
149
updatedRoutePattern =
RoutePatternFactory
.Combine(groupPrefix, updatedRoutePattern);
216
pattern =
RoutePatternFactory
.Combine(groupPrefix, pattern);
322
attributeRoutePattern =
RoutePatternFactory
.Parse(action.AttributeRouteInfo!.Template!, updatedDefaults, parameterPolicies: null);
Routing\ConventionalRouteEntry.cs (1)
40
Pattern =
RoutePatternFactory
.Parse(pattern, defaults, constraints);
Microsoft.AspNetCore.Mvc.Core.Test (9)
ApplicationModels\EndpointMetadataProviderTest.cs (4)
104
Prefix =
RoutePatternFactory
.Parse("/"),
147
Prefix =
RoutePatternFactory
.Parse("/"),
168
Prefix =
RoutePatternFactory
.Parse("/"),
189
Prefix =
RoutePatternFactory
.Parse("/"),
Routing\ControllerActionEndpointDataSourceTest.cs (1)
426
var groupPattern =
RoutePatternFactory
.Parse("/group1");
Routing\ControllerLinkGeneratorExtensionsTest.cs (1)
201
RoutePatternFactory
.Parse(template, defaults, parameterPolicies: null, requiredValues),
Routing\EndpointRoutingUrlHelperTest.cs (1)
271
RoutePatternFactory
.Parse(template, defaults, parameterPolicies: null, requiredValues),
Routing\PageLinkGeneratorExtensionsTest.cs (1)
171
RoutePatternFactory
.Parse(template, defaults, parameterPolicies: null, requiredValues),
Routing\RoutePatternWriterTests.cs (1)
25
var routePattern =
RoutePatternFactory
.Parse(template);
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\PageActionEndpointDataSourceTest.cs (1)
144
var groupPattern =
RoutePatternFactory
.Parse("/group1");
Microsoft.AspNetCore.OpenApi (1)
Extensions\ApiDescriptionExtensions.cs (1)
51
var routePattern =
RoutePatternFactory
.Parse(apiDescription.RelativePath);
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiGeneratorTests.cs (1)
1009
var routePattern =
RoutePatternFactory
.Parse(pattern ?? "/");
Microsoft.AspNetCore.RateLimiting.Tests (2)
RateLimitingMetricsTests.cs (2)
196
var routeEndpointBuilder = new RouteEndpointBuilder(c => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
271
var routeEndpointBuilder = new RouteEndpointBuilder(c => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
Microsoft.AspNetCore.Routing (32)
Builder\EndpointRouteBuilderExtensions.cs (6)
38
endpoints.MapGroup(
RoutePatternFactory
.Parse(prefix ?? throw new ArgumentNullException(nameof(prefix))));
154
return endpoints.Map(
RoutePatternFactory
.Parse(pattern), requestDelegate, httpMethods);
170
return Map(endpoints,
RoutePatternFactory
.Parse(pattern), requestDelegate);
328
return endpoints.Map(
RoutePatternFactory
.Parse(pattern), handler, httpMethods, isFallback: false);
346
return Map(endpoints,
RoutePatternFactory
.Parse(pattern), handler);
421
return endpoints.Map(
RoutePatternFactory
.Parse(pattern), handler, httpMethods: null, isFallback: true);
Builder\RouteHandlerServices.cs (1)
80
.AddRouteHandler(
RoutePatternFactory
.Parse(pattern),
EndpointDataSource.cs (1)
54
var fullRoutePattern =
RoutePatternFactory
.Combine(context.Prefix, routeEndpoint.RoutePattern);
Patterns\DefaultRoutePatternTransformer.cs (2)
228
var updatedParameter =
RoutePatternFactory
.ParameterPart(parameter.Name, @default: null, parameter.ParameterKind, parameter.ParameterPolicies);
232
segments[i] =
RoutePatternFactory
.Segment(updatedParts);
Patterns\RouteParameterParser.cs (8)
137
constraints.Add(
RoutePatternFactory
.ParameterPolicy(constraintText));
151
constraints.Add(
RoutePatternFactory
.ParameterPolicy(constraintText));
156
constraints.Add(
RoutePatternFactory
.ParameterPolicy(constraintText));
162
constraints.Add(
RoutePatternFactory
.ParameterPolicy(constraintText));
177
constraints.Add(
RoutePatternFactory
.ParameterPolicy(constraintText));
206
constraints.Add(
RoutePatternFactory
.ParameterPolicy(constraintText));
213
constraints.Add(
RoutePatternFactory
.ParameterPolicy(constraintText));
225
constraints.Add(
RoutePatternFactory
.ParameterPolicy(constraintText));
Patterns\RoutePattern.cs (1)
13
/// Use <see cref="
RoutePatternFactory
"/> to create <see cref="RoutePattern"/>
Patterns\RoutePatternParser.cs (3)
63
return
RoutePatternFactory
.Pattern(pattern, segments);
307
parts.Add(
RoutePatternFactory
.LiteralPart(decoded));
391
parts[i - 1] =
RoutePatternFactory
.SeparatorPart(((RoutePatternLiteralPart)previousPart).Content);
RouteEndpointDataSource.cs (1)
126
var pattern =
RoutePatternFactory
.Combine(groupPrefix, entry.RoutePattern);
RouteGroupBuilder.cs (3)
94
var fullPrefix =
RoutePatternFactory
.Combine(prefix, _routeGroupBuilder._partialPrefix);
96
var combinedConventions =
RoutePatternFactory
.CombineLists(conventions, _routeGroupBuilder._conventions);
97
var combinedFinallyConventions =
RoutePatternFactory
.CombineLists(_routeGroupBuilder._finallyConventions, finallyConventions);
Template\RouteTemplate.cs (1)
140
return
RoutePatternFactory
.Pattern(TemplateText, segments);
Template\TemplateParser.cs (1)
24
var inner =
RoutePatternFactory
.Parse(routeTemplate);
Template\TemplatePart.cs (3)
159
return
RoutePatternFactory
.SeparatorPart(Text!);
163
return
RoutePatternFactory
.LiteralPart(Text!);
174
return
RoutePatternFactory
.ParameterPart(Name!, DefaultValue, kind, constraints);
Template\TemplateSegment.cs (1)
62
return
RoutePatternFactory
.Segment(parts);
Microsoft.AspNetCore.Routing.Microbenchmarks (3)
EndpointRoutingBenchmarkBase.cs (2)
120
RoutePatternFactory
.Parse(template, defaults, constraints, requiredValues),
139
new RouteTemplate(
RoutePatternFactory
.Parse(
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
51
var withoutDefaults =
RoutePatternFactory
.Parse(endpoint.RoutePattern.RawText);
Microsoft.AspNetCore.Routing.Tests (242)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (1)
81
RoutePatternFactory
.Parse("{*p}"),
Builder\GroupTest.cs (3)
145
ex = Assert.Throws<ArgumentNullException>(() => builder!.MapGroup(
RoutePatternFactory
.Parse("/")));
246
((RouteEndpointBuilder)builder).RoutePattern =
RoutePatternFactory
.Parse("/bar");
377
RoutePatternFactory
.Parse("/foo"),
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (4)
355
var endpointBuilder = builder.Map(
RoutePatternFactory
.Parse("/"), requestDelegate);
372
var endpointBuilder = builder.Map(
RoutePatternFactory
.Parse("/"), Handle);
391
var endpointBuilder = builder.Map(
RoutePatternFactory
.Parse("/"), handler.Compile());
516
.Map(
RoutePatternFactory
.Parse("/"), context => Task.CompletedTask)
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (2)
24
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask,
RoutePatternFactory
.Parse("/"), 0);
244
RoutePatternFactory
.Parse("/test"),
CompositeEndpointDataSourceTest.cs (7)
43
var prefix =
RoutePatternFactory
.Parse("/");
71
Prefix =
RoutePatternFactory
.Parse(""),
288
var prefix =
RoutePatternFactory
.Parse("/prefix");
328
var prefix =
RoutePatternFactory
.Parse("/prefix");
380
var prefix =
RoutePatternFactory
.Parse("/prefix");
439
var prefix =
RoutePatternFactory
.Parse("/prefix");
502
RoutePatternFactory
.Parse(template, defaults, parameterPolicies: null),
DefaultParameterPolicyFactoryTest.cs (25)
22
() => factory.Create(
RoutePatternFactory
.ParameterPart("id", @default: null, RoutePatternParameterKind.Optional), @"notpresent(\d+)"));
44
() => factory.Create(
RoutePatternFactory
.ParameterPart("id"), @"bad"));
58
var parameter =
RoutePatternFactory
.ParameterPart(
62
parameterPolicies: new[] {
RoutePatternFactory
.Constraint("int"), });
77
var parameter =
RoutePatternFactory
.ParameterPart(
81
parameterPolicies: new[] {
RoutePatternFactory
.Constraint("int"), });
97
var parameter =
RoutePatternFactory
.ParameterPart(
101
parameterPolicies: new[] {
RoutePatternFactory
.ParameterPolicy(new IntRouteConstraint()), });
116
var parameter =
RoutePatternFactory
.ParameterPart(
120
parameterPolicies: new[] {
RoutePatternFactory
.ParameterPolicy(new IntRouteConstraint()), });
136
var parameter =
RoutePatternFactory
.ParameterPart(
140
parameterPolicies: new[] {
RoutePatternFactory
.ParameterPolicy(new CustomParameterPolicy()), });
156
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id"), "int");
169
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id"), "range(1,20)");
184
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id", @default: null, RoutePatternParameterKind.Optional), "int");
204
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id", @default: null, RoutePatternParameterKind.Optional), "customParameterPolicy");
223
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id"), "customConstraintPolicy(20)");
244
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id"), "customConstraintPolicy(20,-1)");
267
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id"), "customConstraintPolicy");
288
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id"), "customConstraintPolicy(1)");
309
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id"), "customConstraintPolicy(1)");
332
() => factory.Create(
RoutePatternFactory
.ParameterPart("id"), "customConstraintPolicy(1)"));
352
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id"), @"regex-service(\\d{1,2})");
373
() => factory.Create(
RoutePatternFactory
.ParameterPart("id"), "customConstraintPolicy(20)"));
393
var parameterPolicy = factory.Create(
RoutePatternFactory
.ParameterPart("id", @default: null, RoutePatternParameterKind.Optional), "customParameterPolicy");
EndpointFactory.cs (1)
20
var routePattern =
RoutePatternFactory
.Parse(template, defaults, policies, requiredValues);
Internal\DfaGraphWriterTest.cs (2)
47
RoutePatternFactory
.Parse("/"),
70
RoutePatternFactory
.Parse("/"),
LinkGeneratorIntegrationTest.cs (19)
21
RoutePatternFactory
.Parse(
30
RoutePatternFactory
.Parse(
39
RoutePatternFactory
.Parse(
48
RoutePatternFactory
.Parse(
57
RoutePatternFactory
.Parse(
67
RoutePatternFactory
.Parse(
77
RoutePatternFactory
.Parse(
87
RoutePatternFactory
.Parse(
97
RoutePatternFactory
.Parse(
107
RoutePatternFactory
.Parse(
117
RoutePatternFactory
.Parse(
127
RoutePatternFactory
.Parse(
137
RoutePatternFactory
.Parse(
147
RoutePatternFactory
.Parse(
156
RoutePatternFactory
.Parse(
166
RoutePatternFactory
.Parse(
175
RoutePatternFactory
.Parse(
184
RoutePatternFactory
.Parse(
193
RoutePatternFactory
.Parse(
MatcherPolicyTest.cs (1)
64
RoutePatternFactory
.Parse(template),
Matching\AcceptsMatcherPolicyTest.cs (1)
613
RoutePatternFactory
.Parse(template),
Matching\CandidateSetTest.cs (1)
372
var builder = new RouteEndpointBuilder(TestConstants.EmptyRequestDelegate,
RoutePatternFactory
.Parse(template), order);
Matching\DataSourceDependentMatcherTest.cs (11)
39
RoutePatternFactory
.Parse("a/b/c"),
64
RoutePatternFactory
.Parse("a/b/c"),
104
RoutePatternFactory
.Parse("/"),
126
RoutePatternFactory
.Parse("/"),
149
RoutePatternFactory
.Parse("/foo"),
156
RoutePatternFactory
.Parse("/bar"),
177
RoutePatternFactory
.Parse("/foo"),
184
RoutePatternFactory
.Parse("/bar"),
192
RoutePatternFactory
.Parse("/foo2"),
215
RoutePatternFactory
.Parse("/foo"),
228
RoutePatternFactory
.Parse("/bar"),
Matching\DefaultEndpointSelectorTest.cs (1)
179
RoutePatternFactory
.Parse(template),
Matching\DfaMatcherBuilderTest.cs (1)
3517
var routePattern =
RoutePatternFactory
.Parse(template, defaults, constraints);
Matching\EndpointComparerTest.cs (1)
246
RoutePatternFactory
.Parse(template),
Matching\HostMatcherPolicyIntegrationTestBase.cs (1)
421
RoutePatternFactory
.Parse(template, defaults, constraints),
Matching\HostMatcherPolicyTest.cs (1)
273
RoutePatternFactory
.Parse(template),
Matching\HttpMethodMatcherPolicyIntegrationTestBase.cs (1)
403
RoutePatternFactory
.Parse(template, defaults, constraints),
Matching\HttpMethodMatcherPolicyTest.cs (1)
403
RoutePatternFactory
.Parse(template),
Matching\MatcherConformanceTest.cs (1)
39
RoutePatternFactory
.Parse(template, defaults, constraints),
Matching\RouteMatcherBuilder.cs (1)
51
var withoutDefaults =
RoutePatternFactory
.Parse(endpoint.RoutePattern.RawText);
Patterns\DefaultRoutePatternTransformerTest.cs (17)
29
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
51
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
70
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
96
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
115
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
134
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
156
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
183
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
218
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
240
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
259
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
281
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
300
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
322
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
344
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
366
var original =
RoutePatternFactory
.Parse(template, defaults, policies, new { area = "Admin", controller = "Home", });
389
var original =
RoutePatternFactory
.Parse(template, defaults, policies);
Patterns\InlineRouteParameterParserTest.cs (1)
269
var routePattern =
RoutePatternFactory
.Parse(@"some/url-{p1:int:test(3)=hello}/{p2=abc}/{p3?}");
Patterns\RoutePatternFactoryTest.cs (110)
20
var original =
RoutePatternFactory
.Parse(template);
23
var actual =
RoutePatternFactory
.Pattern(
49
var original =
RoutePatternFactory
.Parse(template);
52
var actual =
RoutePatternFactory
.Pattern(
73
var original =
RoutePatternFactory
.Parse(template);
76
var ex = Assert.Throws<InvalidOperationException>(() =>
RoutePatternFactory
.Pattern(
98
var original =
RoutePatternFactory
.Parse(template);
101
var actual =
RoutePatternFactory
.Pattern(
121
var original =
RoutePatternFactory
.Parse(template);
124
var ex = Assert.Throws<InvalidOperationException>(() =>
RoutePatternFactory
.Pattern(
144
var original =
RoutePatternFactory
.Parse(template);
147
var actual =
RoutePatternFactory
.Pattern(
189
var original =
RoutePatternFactory
.Parse(template);
192
var actual =
RoutePatternFactory
.Pattern(
225
var original =
RoutePatternFactory
.Parse(template);
228
var actual =
RoutePatternFactory
.Pattern(
256
var original =
RoutePatternFactory
.Parse(template);
259
var actual =
RoutePatternFactory
.Pattern(
302
var original =
RoutePatternFactory
.Parse(template);
307
RoutePatternFactory
.Pattern(
323
var original =
RoutePatternFactory
.Parse(template);
326
var actual =
RoutePatternFactory
.Pattern(
359
var original =
RoutePatternFactory
.Parse(template);
362
var actual =
RoutePatternFactory
.Pattern(
387
var original =
RoutePatternFactory
.Parse(template);
390
var ex = Assert.Throws<InvalidOperationException>(() =>
RoutePatternFactory
.Pattern(
406
var literalPartA =
RoutePatternFactory
.LiteralPart("A");
407
var paramPartB =
RoutePatternFactory
.ParameterPart("B");
408
var paramPartC =
RoutePatternFactory
.ParameterPart("C");
409
var paramPartD =
RoutePatternFactory
.ParameterPart("D");
412
RoutePatternFactory
.Segment(literalPartA, paramPartB),
413
RoutePatternFactory
.Segment(paramPartC, literalPartA),
414
RoutePatternFactory
.Segment(paramPartD),
415
RoutePatternFactory
.Segment(literalPartA)
419
var actual =
RoutePatternFactory
.Pattern(segments);
420
segments[1] =
RoutePatternFactory
.Segment(
RoutePatternFactory
.ParameterPart("E"));
435
var literalPartA =
RoutePatternFactory
.LiteralPart("A");
436
var paramPartB =
RoutePatternFactory
.ParameterPart("B");
437
var paramPartC =
RoutePatternFactory
.ParameterPart("C");
438
var paramPartD =
RoutePatternFactory
.ParameterPart("D");
441
RoutePatternFactory
.Segment(literalPartA, paramPartB),
442
RoutePatternFactory
.Segment(paramPartC, literalPartA),
443
RoutePatternFactory
.Segment(paramPartD),
444
RoutePatternFactory
.Segment(literalPartA)
448
var actual =
RoutePatternFactory
.Pattern(rawText, segments);
449
segments[1] =
RoutePatternFactory
.Segment(
RoutePatternFactory
.ParameterPart("E"));
465
var literalPartA =
RoutePatternFactory
.LiteralPart("A");
466
var paramPartB =
RoutePatternFactory
.ParameterPart("B");
467
var paramPartC =
RoutePatternFactory
.ParameterPart("C");
468
var paramPartD =
RoutePatternFactory
.ParameterPart("D");
471
RoutePatternFactory
.Segment(literalPartA, paramPartB),
472
RoutePatternFactory
.Segment(paramPartC, literalPartA),
473
RoutePatternFactory
.Segment(paramPartD),
474
RoutePatternFactory
.Segment(literalPartA)
478
var actual =
RoutePatternFactory
.Pattern(defaults, parameterPolicies, segments);
479
segments[1] =
RoutePatternFactory
.Segment(
RoutePatternFactory
.ParameterPart("E"));
505
var literalPartA =
RoutePatternFactory
.LiteralPart("A");
506
var paramPartB =
RoutePatternFactory
.ParameterPart("B");
507
var paramPartC =
RoutePatternFactory
.ParameterPart("C");
508
var paramPartD =
RoutePatternFactory
.ParameterPart("D");
511
RoutePatternFactory
.Segment(literalPartA, paramPartB),
512
RoutePatternFactory
.Segment(paramPartC, literalPartA),
513
RoutePatternFactory
.Segment(paramPartD),
514
RoutePatternFactory
.Segment(literalPartA)
518
var actual =
RoutePatternFactory
.Pattern(rawText, defaults, parameterPolicies, segments);
519
segments[1] =
RoutePatternFactory
.Segment(
RoutePatternFactory
.ParameterPart("E"));
548
var action =
RoutePatternFactory
.Parse(template, defaults, policies, requiredValues);
568
var action =
RoutePatternFactory
.Parse(template, defaults, policies, requiredValues);
588
var action =
RoutePatternFactory
.Parse(template, defaults, policies, requiredValues);
610
var action =
RoutePatternFactory
.Parse(template, defaults, policies, requiredValues);
636
var parameterPart =
RoutePatternFactory
.ParameterPart(name, defaults, RoutePatternParameterKind.Standard, policies);
663
var parameterPart =
RoutePatternFactory
.ParameterPart(name, defaults, RoutePatternParameterKind.Standard, policies);
679
var paramPartB =
RoutePatternFactory
.ParameterPart("B");
680
var paramPartC =
RoutePatternFactory
.ParameterPart("C");
681
var paramPartD =
RoutePatternFactory
.ParameterPart("D");
685
var actual =
RoutePatternFactory
.Segment((IEnumerable<RoutePatternParameterPart>)parts);
686
parts[1] =
RoutePatternFactory
.ParameterPart("E");
700
var paramPartB =
RoutePatternFactory
.ParameterPart("B");
701
var paramPartC =
RoutePatternFactory
.ParameterPart("C");
702
var paramPartD =
RoutePatternFactory
.ParameterPart("D");
706
var actual =
RoutePatternFactory
.Segment(parts);
707
parts[1] =
RoutePatternFactory
.ParameterPart("E");
732
var left =
RoutePatternFactory
.Parse(leftTemplate);
733
var right =
RoutePatternFactory
.Parse(rightTemplate);
735
var combined =
RoutePatternFactory
.Combine(left, right);
754
var left =
RoutePatternFactory
.Parse("/{id}");
755
var right =
RoutePatternFactory
.Parse("/{ID}");
757
var ex = Assert.Throws<RoutePatternException>(() =>
RoutePatternFactory
.Combine(left, right));
767
var left =
RoutePatternFactory
.Parse("/a/{x=foo}");
768
var right =
RoutePatternFactory
.Parse("/b", defaults: new { X = "foo" }, parameterPolicies: null);
770
var combined =
RoutePatternFactory
.Combine(left, right);
784
var left =
RoutePatternFactory
.Parse("/a", defaults: new { x = "foo" }, parameterPolicies: null, requiredValues: new { x = "foo" });
785
var right =
RoutePatternFactory
.Parse("/b", defaults: new { X = "foo" }, parameterPolicies: null, requiredValues: new { X = "foo" });
787
var combined =
RoutePatternFactory
.Combine(left, right);
802
var left =
RoutePatternFactory
.Parse("/a", defaults: null, parameterPolicies: policies);
803
var right =
RoutePatternFactory
.Parse("/b", defaults: null, parameterPolicies: policies);
805
var ex = Assert.Throws<InvalidOperationException>(() =>
RoutePatternFactory
.Combine(left, right));
814
var left =
RoutePatternFactory
.Parse("/a/{x=foo}");
815
var right =
RoutePatternFactory
.Parse("/b", defaults: new { X = "Foo" }, parameterPolicies: null);
817
var ex = Assert.Throws<InvalidOperationException>(() =>
RoutePatternFactory
.Combine(left, right));
827
var left =
RoutePatternFactory
.Parse("/a", defaults: new { x = "foo" }, parameterPolicies: null, requiredValues: new { x = "foo" });
828
var right =
RoutePatternFactory
.Parse("/b", defaults: new { X = "foo" }, parameterPolicies: null, requiredValues: new { X = "Foo" });
830
var ex = Assert.Throws<InvalidOperationException>(() =>
RoutePatternFactory
.Combine(left, right));
839
var left =
RoutePatternFactory
.Parse("/a/{x:string}");
840
var right =
RoutePatternFactory
.Parse("/b", defaults: null, parameterPolicies: new { X = new RegexRouteConstraint("foo") });
842
var ex = Assert.Throws<InvalidOperationException>(() =>
RoutePatternFactory
.Combine(left, right));
Patterns\RoutePatternParserTest.cs (1)
6
using static Microsoft.AspNetCore.Routing.Patterns.
RoutePatternFactory
;
RouteEndpointBuilderTest.cs (7)
16
var builder = new RouteEndpointBuilder(requestDelegate: null,
RoutePatternFactory
.Parse("/"), order: 0);
34
var builder = new RouteEndpointBuilder(requestDelegate,
RoutePatternFactory
.Parse("/"), defaultOrder)
57
var builder = new RouteEndpointBuilder(requestDelegate,
RoutePatternFactory
.Parse("/"), defaultOrder)
85
var builder = new RouteEndpointBuilder(RequestDelegate,
RoutePatternFactory
.Parse("/"), defaultOrder)
105
var builder = new RouteEndpointBuilder(RequestDelegate,
RoutePatternFactory
.Parse("/"), defaultOrder)
126
var builder = new RouteEndpointBuilder(RequestDelegate,
RoutePatternFactory
.Parse("/"), defaultOrder)
153
var builder = new RouteEndpointBuilder(requestDelegate,
RoutePatternFactory
.Parse("/"), defaultOrder);
RouteValuesAddressSchemeTest.cs (1)
445
RoutePatternFactory
.Parse(template, defaults, parameterPolicies: null, requiredValues: metadataRequiredValues),
RoutingMetricsTests.cs (2)
27
var routeEndpointBuilder = new RouteEndpointBuilder(c => Task.CompletedTask,
RoutePatternFactory
.Parse("/{hi}"), order: 0);
57
var routeEndpointBuilder = new RouteEndpointBuilder(c => Task.CompletedTask,
RoutePatternFactory
.Parse("/{hi}"), order: 0);
Template\RoutePatternPrecedenceTests.cs (3)
22
var parsed =
RoutePatternFactory
.Parse(template);
29
var parameterPrecedence =
RoutePatternFactory
.Parse(
32
var requiredValueParameterPrecedence =
RoutePatternFactory
.Parse(
Template\TemplateBinderTests.cs (5)
1298
RoutePatternFactory
.Parse(
1328
RoutePatternFactory
.Parse(
1358
RoutePatternFactory
.Parse(
1392
RoutePatternFactory
.Parse(
1422
RoutePatternFactory
.Parse(
Template\TemplateSegmentTest.cs (7)
23
var literalPartA =
RoutePatternFactory
.LiteralPart("A");
24
var paramPartB =
RoutePatternFactory
.ParameterPart("B");
25
var paramPartC =
RoutePatternFactory
.ParameterPart("C");
26
var paramPartD =
RoutePatternFactory
.ParameterPart("D");
27
var separatorPartE =
RoutePatternFactory
.SeparatorPart("E");
28
var templateSegment = new TemplateSegment(
RoutePatternFactory
.Segment(paramPartC, literalPartA, separatorPartE, paramPartB));
32
templateSegment.Parts[1] = new TemplatePart(
RoutePatternFactory
.ParameterPart("D"));
Tree\LinkGenerationDecisionTreeTest.cs (1)
749
match.Entry.RouteTemplate = new RouteTemplate(
RoutePatternFactory
.Parse(routeTemplate));
Microsoft.AspNetCore.StaticAssets (2)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
233
routeEndpoint.RoutePattern =
RoutePatternFactory
.Parse(
StaticAssetEndpointFactory.cs (1)
23
RoutePatternFactory
.Parse(resource.Route),
RoutingSandbox (1)
Framework\FrameworkConfigurationBuilder.cs (1)
19
AddPattern(
RoutePatternFactory
.Parse(pattern));