1 write to segments
System.ServiceModel (1)
System\UriTemplate.cs (1)
61
this.
segments
= new List<UriTemplatePathSegment>();
56 references to segments
System.ServiceModel (56)
System\UriTemplate.cs (38)
138
this.
segments
.Add(UriTemplatePathSegment.CreateFromUriTemplate(segment, this));
258
this.firstOptionalSegment = this.
segments
.Count;
427
if (other.
segments
== null || other.queries == null)
546
this.
segments
[i].Lookup(result.RelativePathSegments[i], result.BoundVariables);
553
else if (numMatchedSegments < this.
segments
.Count)
584
Fx.Assert(segmentsCount <= this.
segments
.Count, "How can that be? The Trie is constructed that way!");
586
Fx.Assert(segmentsCount <= other.
segments
.Count, "How can that be? The Trie is constructed that way!");
589
if (!this.
segments
[i].IsEquivalentTo(other.
segments
[i],
665
Fx.Assert(segmentIndex < this.
segments
.Count,
667
this.
segments
[segmentIndex++].Bind(parameters, ref parameterIndex, pathString);
672
Fx.Assert(segmentIndex < this.
segments
.Count,
674
while (this.
segments
[segmentIndex].Nature == UriTemplatePartType.Literal)
676
this.
segments
[segmentIndex++].Bind(parameters, ref parameterIndex, pathString);
679
Fx.Assert(segmentIndex < this.
segments
.Count,
685
else if (this.
segments
.Count > 0 || this.wildcard != null)
687
for (int i = 0; i < this.
segments
.Count; i++)
689
this.
segments
[i].Bind(parameters, ref parameterIndex, pathString);
741
Fx.Assert(numMatchedSegments < this.
segments
.Count, "Otherwise - no defaults to bind");
744
for (int i = numMatchedSegments; i < this.
segments
.Count; i++)
746
switch (this.
segments
[i].Nature)
750
UriTemplateVariablePathSegment vps = this.
segments
[i] as UriTemplateVariablePathSegment;
775
if (relativeSegmentsIndex < this.
segments
.Count)
779
if (!this.
segments
[relativeSegmentsIndex].IsMatch(lps, ignoreSlash))
843
if (this.
segments
.Count != other.
segments
.Count)
847
for (int i = 0; i < this.
segments
.Count; ++i)
849
if (!this.
segments
[i].IsEquivalentTo(other.
segments
[i],
850
(i == this.
segments
.Count - 1) && !this.HasWildcard && (this.ignoreTrailingSlash || other.ignoreTrailingSlash)))
1427
int segmentIndex = this.owner.
segments
.Count - (this.pathSegmentVariableNames.Count - i);
1428
if (this.owner.
segments
[segmentIndex].Nature != UriTemplatePartType.Variable)
1433
this.owner.
segments
[segmentIndex].OriginalSegment)));
1443
firstOptionalSegment = this.owner.
segments
.Count - numNullablePathVariables;
1448
UriTemplatePathSegment ps = this.owner.
segments
[firstOptionalSegment - 1];
1495
(this.owner.
segments
[this.owner.
segments
.Count - 1].Nature != UriTemplatePartType.Literal))
1712
Fx.Assert(numMatchedSegments == this.owner.
segments
.Count, "We should have matched the other segments");
System\UriTemplateEquivalenceComparer.cs (4)
46
for (int i = obj.
segments
.Count - 1; i >= 0; --i)
48
if (obj.
segments
[i].Nature == UriTemplatePartType.Literal)
50
return obj.
segments
[i].GetHashCode();
53
return obj.
segments
.Count + obj.queries.Count;
System\UriTemplateTable.cs (7)
231
minSegmentsCount = candidate.Template.
segments
.Count;
234
else if (candidate.Template.
segments
.Count < minSegmentsCount)
236
minSegmentsCount = candidate.Template.
segments
.Count;
240
else if (candidate.Template.
segments
.Count == minSegmentsCount)
247
Fx.Assert(nextCandidates[0].Template.
segments
.Count == minSegmentsCount, "Trivial");
339
segmentsCount = candidates[i].Template.
segments
.Count;
341
else if (segmentsCount != candidates[i].Template.
segments
.Count)
System\UriTemplateTrieNode.cs (7)
63
bool needProcessingOnFinalNode = ((ut.
segments
.Count == 0) || ut.HasWildcard ||
64
ut.
segments
[ut.
segments
.Count - 1].EndsWithSlash);
65
for (int i = 0; i < ut.
segments
.Count; ++i)
71
UriTemplatePathSegment ps = ut.
segments
[i];
74
Fx.Assert(i == ut.
segments
.Count - 1, "only the last segment can !EndsWithSlash");
465
if (pes.SegmentsCount < kvp.Key.
segments
.Count)