27 instantiations of TemplateSegment
Microsoft.AspNetCore.Routing (1)
Template\RouteTemplate.cs (1)
35
Segments.Add(new
TemplateSegment
(p));
Microsoft.AspNetCore.Routing.Tests (26)
Template\TemplateParserTests.cs (24)
17
expected.Segments.Add(new
TemplateSegment
());
34
expected.Segments.Add(new
TemplateSegment
());
53
expected.Segments.Add(new
TemplateSegment
());
72
expected.Segments.Add(new
TemplateSegment
());
74
expected.Segments.Add(new
TemplateSegment
());
76
expected.Segments.Add(new
TemplateSegment
());
94
expected.Segments.Add(new
TemplateSegment
());
102
expected.Segments.Add(new
TemplateSegment
());
110
expected.Segments.Add(new
TemplateSegment
());
132
expected.Segments.Add(new
TemplateSegment
());
155
expected.Segments.Add(new
TemplateSegment
());
178
expected.Segments.Add(new
TemplateSegment
());
207
expected.Segments.Add(new
TemplateSegment
());
231
expected.Segments.Add(new
TemplateSegment
());
261
expected.Segments.Add(new
TemplateSegment
());
291
expected.Segments.Add(new
TemplateSegment
());
329
expected.Segments.Add(new
TemplateSegment
());
367
expected.Segments.Add(new
TemplateSegment
());
383
expected.Segments.Add(new
TemplateSegment
());
404
expected.Segments.Add(new
TemplateSegment
());
411
expected.Segments.Add(new
TemplateSegment
());
441
expected.Segments.Add(new
TemplateSegment
());
448
expected.Segments.Add(new
TemplateSegment
());
475
expected.Segments.Add(new
TemplateSegment
());
Template\TemplateSegmentTest.cs (2)
15
var actual = Assert.ThrowsAny<ArgumentNullException>(() => new
TemplateSegment
(other));
28
var templateSegment = new
TemplateSegment
(RoutePatternFactory.Segment(paramPartC, literalPartA, separatorPartE, paramPartB));
38 references to TemplateSegment
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
DefaultApiDescriptionProvider.cs (1)
394
foreach (
var
segment in parsedTemplate.Segments)
Microsoft.AspNetCore.Routing (19)
Template\RoutePrecedence.cs (4)
45
var
segment = template.Segments[i];
99
var
segment = template.Segments[i];
149
private static int ComputeOutboundPrecedenceDigit(
TemplateSegment
segment)
215
private static int ComputeInboundPrecedenceDigit(
TemplateSegment
segment)
Template\RouteTemplate.cs (10)
32
Segments = new List<
TemplateSegment
>(other.PathSegments.Count);
41
var
segment = Segments[i];
58
/// <param name="segments">A list of <see cref="
TemplateSegment
"/>.</param>
59
public RouteTemplate(string template, List<
TemplateSegment
> segments)
70
var
segment = Segments[i];
93
/// Gets the list of <see cref="
TemplateSegment
"/> that compromise the route template.
95
public IList<
TemplateSegment
> Segments { get; }
98
/// Gets the <see cref="
TemplateSegment
"/> at a given index.
101
/// <returns>A <see cref="
TemplateSegment
"/> instance.</returns>
102
public
TemplateSegment
? GetSegment(int index)
Template\TemplateMatcher.cs (1)
41
var
segment = Template.Segments[i];
Template\TemplateSegment.cs (2)
17
/// Constructs a new <see cref="
TemplateSegment
"/> instance.
25
/// Constructs a new <see cref="
TemplateSegment
"/> instance given another <see cref="RoutePatternPathSegment"/>.
Tree\UrlMatchingTree.cs (2)
79
var
segment = entry.RouteTemplate.Segments[i];
247
private static bool RemainingSegmentsAreOptional(IList<
TemplateSegment
> segments, int currentParameterIndex)
Microsoft.AspNetCore.Routing.Tests (18)
Template\TemplateParserTests.cs (17)
16
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
33
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
52
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
71
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
92
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
131
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
154
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
177
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
206
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
230
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
260
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
290
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
328
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
366
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
403
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
440
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
474
var expected = new RouteTemplate(template, new List<
TemplateSegment
>());
Template\TemplateSegmentTest.cs (1)
28
var
templateSegment = new TemplateSegment(RoutePatternFactory.Segment(paramPartC, literalPartA, separatorPartE, paramPartB));