3 instantiations of RoutePatternPathSegment
Microsoft.AspNetCore.Routing (3)
Patterns\RoutePatternFactory.cs (2)
568
return new
RoutePatternPathSegment
(updatedParts);
718
return new
RoutePatternPathSegment
(parts);
Patterns\RoutePatternParser.cs (1)
134
segments.Add(new
RoutePatternPathSegment
(parts));
85 references to RoutePatternPathSegment
Microsoft.AspNetCore.Mvc.Core (3)
Routing\RoutePatternWriter.cs (3)
11
public static void WriteString(StringBuilder sb, IEnumerable<
RoutePatternPathSegment
> routeSegments)
13
foreach (
var
segment in routeSegments)
24
private static void WriteString(StringBuilder sb,
RoutePatternPathSegment
segment)
Microsoft.AspNetCore.OpenApi (1)
Extensions\ApiDescriptionExtensions.cs (1)
55
var
segment = routePattern.PathSegments[i];
Microsoft.AspNetCore.Routing (76)
Matching\Candidate.cs (3)
32
public readonly (
RoutePatternPathSegment
pathSegment, int segmentIndex)[] ComplexSegments;
57
ComplexSegments = Array.Empty<(
RoutePatternPathSegment
pathSegment, int segmentIndex)>();
70
(
RoutePatternPathSegment
pathSegment, int segmentIndex)[] complexSegments,
Matching\DfaMatcher.cs (3)
277
(
RoutePatternPathSegment
pathSegment, int segmentIndex)[] complexSegments,
284
(
var
complexSegment, var segmentIndex) = complexSegments[i];
364
public static void CandidateRejectedByComplexSegment(ILogger logger, string path, Endpoint endpoint,
RoutePatternPathSegment
segment)
Matching\DfaMatcherBuilder.cs (12)
31
private readonly List<(
RoutePatternPathSegment
pathSegment, int segmentIndex)> _complexSegments;
55
_complexSegments = new List<(
RoutePatternPathSegment
pathSegment, int segmentIndex)>();
231
var
segment = GetCurrentSegment(endpoint, depth);
255
RoutePatternPathSegment
segment)
372
private void AddParentsMatchingComplexSegment(RouteEndpoint endpoint, List<DfaNode> nextParents,
RoutePatternPathSegment
segment, DfaNode parent, RoutePatternParameterPart parameterPart)
511
private static
RoutePatternPathSegment
GetCurrentSegment(RouteEndpoint endpoint, int depth)
523
var
lastSegment = endpoint.RoutePattern.PathSegments[endpoint.RoutePattern.PathSegments.Count - 1];
534
var
segment = GetCurrentSegment(endpoint, depth);
755
var
segment = routeEndpoint.RoutePattern.PathSegments[i];
802
var
segment = routeEndpoint.RoutePattern.PathSegments[i];
843
Array.Empty<(
RoutePatternPathSegment
pathSegment, int segmentIndex)>(),
852
var
segment = endpoint.RoutePattern.PathSegments[i];
Patterns\DefaultRoutePatternTransformer.cs (4)
151
List<
RoutePatternPathSegment
> updatedSegments = null;
174
updatedSegments = new List<
RoutePatternPathSegment
>(original.PathSegments);
217
private static void RemoveParameterDefault(List<
RoutePatternPathSegment
> segments, List<RoutePatternParameterPart> parameters, RoutePatternParameterPart parameter)
222
var
segment = segments[i];
Patterns\RoutePattern.cs (2)
46
IReadOnlyList<
RoutePatternPathSegment
> pathSegments)
131
public IReadOnlyList<
RoutePatternPathSegment
> PathSegments { get; }
Patterns\RoutePatternFactory.cs (23)
165
public static RoutePattern Pattern(IEnumerable<
RoutePatternPathSegment
> segments)
178
public static RoutePattern Pattern(string? rawText, IEnumerable<
RoutePatternPathSegment
> segments)
207
IEnumerable<
RoutePatternPathSegment
> segments)
234
IEnumerable<
RoutePatternPathSegment
> segments)
264
IEnumerable<
RoutePatternPathSegment
> segments)
293
IEnumerable<
RoutePatternPathSegment
> segments)
305
public static RoutePattern Pattern(params
RoutePatternPathSegment
[] segments)
318
public static RoutePattern Pattern(string rawText, params
RoutePatternPathSegment
[] segments)
346
params
RoutePatternPathSegment
[] segments)
373
params
RoutePatternPathSegment
[] segments)
403
params
RoutePatternPathSegment
[] segments)
432
params
RoutePatternPathSegment
[] segments)
445
IEnumerable<
RoutePatternPathSegment
> segments)
473
var
segment = VisitSegment(updatedSegments[i]);
543
RoutePatternPathSegment
VisitSegment(
RoutePatternPathSegment
segment)
691
/// Creates a <see cref="
RoutePatternPathSegment
"/> from the provided collection
695
/// <returns>The <see cref="
RoutePatternPathSegment
"/>.</returns>
696
public static
RoutePatternPathSegment
Segment(IEnumerable<RoutePatternPart> parts)
704
/// Creates a <see cref="
RoutePatternPathSegment
"/> from the provided collection
708
/// <returns>The <see cref="
RoutePatternPathSegment
"/>.</returns>
709
public static
RoutePatternPathSegment
Segment(params RoutePatternPart[] parts)
716
private static
RoutePatternPathSegment
SegmentCore(RoutePatternPart[] parts)
Patterns\RoutePatternMatcher.cs (9)
38
var
segment = RoutePattern.PathSegments[i];
86
var
pathSegment = i >= RoutePattern.PathSegments.Count ? null : RoutePattern.PathSegments[i];
110
var
pathSegment = RoutePattern.PathSegments[i];
149
var
pathSegment = RoutePattern.PathSegments[i++];
167
var
pathSegment = RoutePattern.PathSegments[i];
202
private bool TryMatchLiterals(int index, StringSegment stringSegment,
RoutePatternPathSegment
pathSegment)
247
private bool SavePathSegmentsAsValues(int index, RouteValueDictionary values, StringSegment requestSegment,
RoutePatternPathSegment
pathSegment)
287
RoutePatternPathSegment
routeSegment,
333
RoutePatternPathSegment
routeSegment,
Patterns\RoutePatternParser.cs (7)
32
var segments = new List<
RoutePatternPathSegment
>();
71
private static bool ParseSegment(Context context, List<
RoutePatternPathSegment
> segments)
316
private static bool IsAllValid(Context context, List<
RoutePatternPathSegment
> segments)
321
var
segment = segments[i];
371
RoutePatternPathSegment
.DebuggerToString(parts),
384
RoutePatternPathSegment
.DebuggerToString(parts),
400
RoutePatternPathSegment
.DebuggerToString(parts),
Patterns\RoutePatternPathSegment.cs (2)
10
/// Represents a path segment in a route pattern. Instances of <see cref="
RoutePatternPathSegment
"/> are
15
/// <see cref="
RoutePatternPathSegment
"/> contains a group of
Template\RoutePrecedence.cs (4)
66
var
segment = routePattern.PathSegments[i];
122
var
segment = routePattern.PathSegments[i];
177
private static int ComputeOutboundPrecedenceDigit(
RoutePatternPathSegment
pathSegment)
249
internal static int ComputeInboundPrecedenceDigit(RoutePattern routePattern,
RoutePatternPathSegment
pathSegment)
Template\RouteTemplate.cs (1)
33
foreach (
var
p in other.PathSegments)
Template\TemplateSegment.cs (6)
25
/// Constructs a new <see cref="TemplateSegment"/> instance given another <see cref="
RoutePatternPathSegment
"/>.
27
/// <param name="other">A <see cref="
RoutePatternPathSegment
"/> instance.</param>
28
public TemplateSegment(
RoutePatternPathSegment
other)
56
/// Returns a <see cref="
RoutePatternPathSegment
"/> for the template segment.
58
/// <returns>A <see cref="
RoutePatternPathSegment
"/> instance.</returns>
59
public
RoutePatternPathSegment
ToRoutePatternPathSegment()
Microsoft.AspNetCore.Routing.Tests (5)
Patterns\RoutePatternFactoryTest.cs (3)
685
var
actual = RoutePatternFactory.Segment((IEnumerable<RoutePatternParameterPart>)parts);
706
var
actual = RoutePatternFactory.Segment(parts);
737
static Action<
RoutePatternPathSegment
> AssertLiteral(string literal)
Template\TemplateSegmentTest.cs (2)
13
const
RoutePatternPathSegment
other = null;
31
var
routePatternPathSegment = templateSegment.ToRoutePatternPathSegment();