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