23 instantiations of RouteTemplate
Microsoft.AspNetCore.Routing (2)
RouteValuesAddressScheme.cs (1)
157RouteTemplate = new RouteTemplate(endpoint.RoutePattern),
Template\TemplateParser.cs (1)
25return new RouteTemplate(inner);
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
EndpointRoutingBenchmarkBase.cs (1)
139new RouteTemplate(RoutePatternFactory.Parse(
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (1)
68new RouteTemplate(endpoint.RoutePattern),
Microsoft.AspNetCore.Routing.Tests (19)
Matching\TreeRouterMatcherBuilder.cs (1)
68new RouteTemplate(endpoint.RoutePattern),
Template\TemplateParserTests.cs (17)
16var expected = new RouteTemplate(template, new List<TemplateSegment>()); 33var expected = new RouteTemplate(template, new List<TemplateSegment>()); 52var expected = new RouteTemplate(template, new List<TemplateSegment>()); 71var expected = new RouteTemplate(template, new List<TemplateSegment>()); 92var expected = new RouteTemplate(template, new List<TemplateSegment>()); 131var expected = new RouteTemplate(template, new List<TemplateSegment>()); 154var expected = new RouteTemplate(template, new List<TemplateSegment>()); 177var expected = new RouteTemplate(template, new List<TemplateSegment>()); 206var expected = new RouteTemplate(template, new List<TemplateSegment>()); 230var expected = new RouteTemplate(template, new List<TemplateSegment>()); 260var expected = new RouteTemplate(template, new List<TemplateSegment>()); 290var expected = new RouteTemplate(template, new List<TemplateSegment>()); 328var expected = new RouteTemplate(template, new List<TemplateSegment>()); 366var expected = new RouteTemplate(template, new List<TemplateSegment>()); 403var expected = new RouteTemplate(template, new List<TemplateSegment>()); 440var expected = new RouteTemplate(template, new List<TemplateSegment>()); 474var expected = new RouteTemplate(template, new List<TemplateSegment>());
Tree\LinkGenerationDecisionTreeTest.cs (1)
749match.Entry.RouteTemplate = new RouteTemplate(RoutePatternFactory.Parse(routeTemplate));
102 references to RouteTemplate
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
DefaultApiDescriptionProvider.cs (3)
99var parsedTemplate = ParseTemplate(action); 375private static RouteTemplate? ParseTemplate(ControllerActionDescriptor action) 385private string? GetRelativePath(RouteTemplate? parsedTemplate)
Microsoft.AspNetCore.Mvc.Core (5)
ApplicationModels\InferParameterBindingInfoConvention.cs (1)
162var parsedTemplate = TemplateParser.Parse(selector.AttributeRouteModel.Template!);
Routing\AttributeRoute.cs (4)
145var templateCache = new Dictionary<string, RouteTemplate>(StringComparer.OrdinalIgnoreCase); 179Dictionary<string, RouteTemplate> templateCache, 190if (!templateCache.TryGetValue(template, out var parsedTemplate)) 239public RouteTemplate? RouteTemplate { get; set; }
Microsoft.AspNetCore.Routing (31)
RouteBase.cs (7)
88/// Gets the <see cref="RouteTemplate"/> associated with the route. 90public virtual RouteTemplate ParsedTemplate { get; protected set; } 199/// Extracts constatins from a given <see cref="RouteTemplate"/>. 202/// <param name="parsedTemplate">A <see cref="RouteTemplate"/> instance.</param> 206RouteTemplate parsedTemplate, 238/// <param name="parsedTemplate">A <see cref="RouteTemplate"/> instance.</param> 241RouteTemplate parsedTemplate,
Template\DefaultTemplateBinderFactory.cs (1)
26public override TemplateBinder Create(RouteTemplate template, RouteValueDictionary defaults)
Template\RoutePrecedence.cs (4)
33/// <param name="template">The <see cref="RouteTemplate"/> to compute precedence for.</param> 35public static decimal ComputeInbound(RouteTemplate template) 87/// <param name="template">The <see cref="RouteTemplate"/> to compute precedence for.</param> 89public static decimal ComputeOutbound(RouteTemplate template)
Template\RouteTemplate.cs (3)
21/// Constructs a new <see cref="RouteTemplate"/> instance given <paramref name="other"/>. 54/// Constructs a a new <see cref="RouteTemplate" /> instance given the <paramref name="template"/> string 133/// Converts the <see cref="RouteTemplate"/> to the equivalent
Template\TemplateBinder.cs (2)
41/// <param name="template">The <see cref="RouteTemplate"/> to bind values to.</param> 46RouteTemplate template,
Template\TemplateBinderFactory.cs (1)
20public abstract TemplateBinder Create(RouteTemplate template, RouteValueDictionary defaults);
Template\TemplateMatcher.cs (4)
24/// <param name="template">The <see cref="RouteTemplate"/> to compare against.</param> 27RouteTemplate template, 70/// Gets the <see cref="RouteTemplate"/> to match against. 72public RouteTemplate Template { get; }
Template\TemplateParser.cs (3)
14/// Creates a <see cref="RouteTemplate"/> for a given <paramref name="routeTemplate"/> string. 17/// <returns>A <see cref="RouteTemplate"/> instance.</returns> 18public static RouteTemplate Parse(string routeTemplate)
Tree\InboundRouteEntry.cs (1)
72public RouteTemplate RouteTemplate { get; set; }
Tree\OutboundRouteEntry.cs (1)
61public RouteTemplate RouteTemplate { get; set; }
Tree\TreeRouteBuilder.cs (4)
74/// <param name="routeTemplate">The <see cref="RouteTemplate"/> of the route.</param> 82RouteTemplate routeTemplate, 174/// <param name="routeTemplate">The <see cref="RouteTemplate"/> of the route.</param> 181RouteTemplate routeTemplate,
Microsoft.AspNetCore.Routing.Tests (60)
InlineRouteParameterParserTests.cs (2)
277var template = ParseRouteTemplate(@"some/url-{p1:int:test(3)=hello}/{p2=abc}/{p3?}"); 951private static RouteTemplate ParseRouteTemplate(string template)
Template\RouteTemplatePrecedenceTests.cs (2)
18private static decimal ComputeRouteTemplate(string template, Func<RouteTemplate, decimal> func) 20var parsed = TemplateParser.Parse(template);
Template\TemplateParserTests.cs (56)
16var expected = new RouteTemplate(template, new List<TemplateSegment>()); 21var actual = TemplateParser.Parse(template); 24Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 33var expected = new RouteTemplate(template, new List<TemplateSegment>()); 40var actual = TemplateParser.Parse(template); 43Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 52var expected = new RouteTemplate(template, new List<TemplateSegment>()); 59var actual = TemplateParser.Parse(template); 62Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 71var expected = new RouteTemplate(template, new List<TemplateSegment>()); 80var actual = TemplateParser.Parse(template); 83Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 92var expected = new RouteTemplate(template, new List<TemplateSegment>()); 119var actual = TemplateParser.Parse(template); 122Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 131var expected = new RouteTemplate(template, new List<TemplateSegment>()); 142var actual = TemplateParser.Parse(template); 145Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 154var expected = new RouteTemplate(template, new List<TemplateSegment>()); 165var actual = TemplateParser.Parse(template); 168Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 177var expected = new RouteTemplate(template, new List<TemplateSegment>()); 194var actual = TemplateParser.Parse(template); 197Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 206var expected = new RouteTemplate(template, new List<TemplateSegment>()); 218var actual = TemplateParser.Parse(template); 221Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 230var expected = new RouteTemplate(template, new List<TemplateSegment>()); 248var actual = TemplateParser.Parse(template); 251Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 260var expected = new RouteTemplate(template, new List<TemplateSegment>()); 278var actual = TemplateParser.Parse(template); 281Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 290var expected = new RouteTemplate(template, new List<TemplateSegment>()); 316var actual = TemplateParser.Parse(template); 319Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 328var expected = new RouteTemplate(template, new List<TemplateSegment>()); 354var actual = TemplateParser.Parse(template); 357Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 366var expected = new RouteTemplate(template, new List<TemplateSegment>()); 391var actual = TemplateParser.Parse(template); 394Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 403var expected = new RouteTemplate(template, new List<TemplateSegment>()); 428var actual = TemplateParser.Parse(template); 431Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 440var expected = new RouteTemplate(template, new List<TemplateSegment>()); 459var actual = TemplateParser.Parse(template); 462Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 474var expected = new RouteTemplate(template, new List<TemplateSegment>()); 486var actual = TemplateParser.Parse(template); 489Assert.Equal<RouteTemplate>(expected, actual, new TemplateEqualityComparer()); 764var pattern = TemplateParser.Parse(routeTemplate); 809private class TemplateEqualityComparer : IEqualityComparer<RouteTemplate> 811public bool Equals(RouteTemplate x, RouteTemplate y) 902public int GetHashCode(RouteTemplate obj)
Swaggatherer (3)
RouteEntry.cs (1)
10public RouteTemplate Template { get; set; }
SwaggathererApplication.cs (2)
157var parsed = TemplateParser.Parse(template); 234private static string GenerateRequestUrl(RouteTemplate template)