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