2 writes to Parts
Microsoft.AspNetCore.Routing (2)
Template\TemplateSegment.cs (2)
21
Parts
= new List<TemplatePart>();
33
Parts
= new List<TemplatePart>(partCount);
103 references to Parts
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
DefaultApiDescriptionProvider.cs (1)
397
foreach (var part in segment.
Parts
)
Microsoft.AspNetCore.Routing (16)
Template\RoutePrecedence.cs (4)
151
if (segment.
Parts
.Count > 1)
156
var part = segment.
Parts
[0];
217
if (segment.
Parts
.Count > 1)
223
var part = segment.
Parts
[0];
Template\RouteTemplate.cs (4)
42
for (var j = 0; j < segment.
Parts
.Count; j++)
44
var part = segment.
Parts
[j];
71
for (var j = 0; j < segment.
Parts
.Count; j++)
73
var part = segment.
Parts
[j];
Template\TemplateMatcher.cs (1)
47
var part = segment.
Parts
[0];
Template\TemplateSegment.cs (4)
36
Parts
.Add(new TemplatePart(other.Parts[i]));
43
public bool IsSimple =>
Parts
.Count == 1;
52
return string.Join(string.Empty,
Parts
.Select(p => p.DebuggerToString()));
61
var parts =
Parts
.Select(p => p.ToRoutePatternPart());
Tree\UrlMatchingTree.cs (3)
98
Debug.Assert(segment.
Parts
.Count == 1);
99
var part = segment.
Parts
[0];
260
var part = segments[i].
Parts
[0];
Microsoft.AspNetCore.Routing.Tests (83)
Template\TemplateParserTests.cs (81)
18
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("cool"));
35
expected.Segments[0].
Parts
.Add(
37
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
54
expected.Segments[0].
Parts
.Add(
56
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
73
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("cool"));
75
expected.Segments[1].
Parts
.Add(TemplatePart.CreateLiteral("awesome"));
77
expected.Segments[2].
Parts
.Add(TemplatePart.CreateLiteral("super"));
95
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
100
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
103
expected.Segments[1].
Parts
.Add(TemplatePart.CreateParameter("p2",
108
expected.Parameters.Add(expected.Segments[1].
Parts
[0]);
111
expected.Segments[2].
Parts
.Add(TemplatePart.CreateParameter("p3",
116
expected.Parameters.Add(expected.Segments[2].
Parts
[0]);
133
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("cool-"));
134
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
139
expected.Parameters.Add(expected.Segments[0].
Parts
[1]);
156
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
161
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
162
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("cool-"));
179
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
184
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
185
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("cool-"));
186
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p2",
191
expected.Parameters.Add(expected.Segments[0].
Parts
[2]);
208
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("cool-"));
209
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
214
expected.Parameters.Add(expected.Segments[0].
Parts
[1]);
215
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("-awesome"));
232
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
237
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("."));
238
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p2",
244
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
245
expected.Parameters.Add(expected.Segments[0].
Parts
[2]);
262
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
267
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("."));
268
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p2",
274
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
275
expected.Parameters.Add(expected.Segments[0].
Parts
[2]);
292
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
297
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("."));
298
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p2",
304
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("."));
305
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p3",
311
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
312
expected.Parameters.Add(expected.Segments[0].
Parts
[2]);
313
expected.Parameters.Add(expected.Segments[0].
Parts
[4]);
330
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
335
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("."));
336
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p2",
342
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("."));
343
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p3",
349
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
350
expected.Parameters.Add(expected.Segments[0].
Parts
[2]);
351
expected.Parameters.Add(expected.Segments[0].
Parts
[4]);
368
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
373
expected.Segments[0].
Parts
.Add(TemplatePart.CreateLiteral("."));
374
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p2",
380
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
381
expected.Parameters.Add(expected.Segments[0].
Parts
[2]);
384
expected.Segments[1].
Parts
.Add(TemplatePart.CreateParameter("p3",
389
expected.Parameters.Add(expected.Segments[1].
Parts
[0]);
405
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p1",
412
expected.Segments[1].
Parts
.Add(TemplatePart.CreateParameter("p2",
417
expected.Segments[1].
Parts
.Add(TemplatePart.CreateLiteral("."));
418
expected.Segments[1].
Parts
.Add(TemplatePart.CreateParameter("p3",
423
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
424
expected.Parameters.Add(expected.Segments[1].
Parts
[0]);
425
expected.Parameters.Add(expected.Segments[1].
Parts
[2]);
442
expected.Segments[0].
Parts
.Add(TemplatePart.CreateParameter("p2",
449
expected.Segments[1].
Parts
.Add(TemplatePart.CreateLiteral("."));
450
expected.Segments[1].
Parts
.Add(TemplatePart.CreateParameter("p3",
455
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
456
expected.Parameters.Add(expected.Segments[1].
Parts
[1]);
477
expected.Segments[0].
Parts
.Add(
483
expected.Parameters.Add(expected.Segments[0].
Parts
[0]);
835
if (x.Segments[i].
Parts
.Count != y.Segments[i].
Parts
.Count)
840
for (int j = 0; j < x.Segments[i].
Parts
.Count; j++)
842
if (!Equals(x.Segments[i].
Parts
[j], y.Segments[i].
Parts
[j]))
Template\TemplateSegmentTest.cs (2)
32
templateSegment.
Parts
[1] = new TemplatePart(RoutePatternFactory.ParameterPart("D"));
33
templateSegment.
Parts
.RemoveAt(0);
Swaggatherer (3)
SwaggathererApplication.cs (3)
194
entry.Template.Segments[k].
Parts
[0].Text,
195
other.Template.Segments[k].
Parts
[0].Text,
245
var part = template.Segments[i].
Parts
[0];