25 references to Distance
System.Text.RegularExpressions.Generator (25)
RegexGenerator.Emitter.cs (12)
1145
writer.WriteLine(primarySet.
Distance
== 0 ?
1147
$"// The pattern matches {DescribeSet(primarySet.Set)} at index {primarySet.
Distance
}.");
1165
string upperBound = "span.Length" + (setsToUse > 1 || primarySet.
Distance
!= 0 ? $" - {minRequiredLength - 1}" : "");
1175
span = (needLoop, primarySet.
Distance
) switch
1179
(false, _) => $"{span}.Slice({primarySet.
Distance
})",
1180
(true, _) => $"{span}.Slice(i + {primarySet.
Distance
})",
1250
int maxDistance = sets[1].
Distance
;
1253
maxDistance = Math.Max(maxDistance, sets[i].
Distance
);
1255
if (maxDistance > primarySet.
Distance
)
1295
string spanIndex = $"span[i{(sets[setIndex].
Distance
> 0 ? $" + {sets[setIndex].
Distance
}" : "")}]";
1329
Debug.Assert(set.
Distance
== 0);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexFindOptimizations.cs (7)
243
FixedDistanceLiteral = (fixedDistanceSets[0].Chars![0], null, fixedDistanceSets[0].
Distance
);
258
FindMode = (fixedDistanceSets.Count == 1 && fixedDistanceSets[0].
Distance
== 0) ?
347
fixedDistanceSets.Sort((s1, s2) => s1.
Distance
.CompareTo(s2.
Distance
));
364
(i > 0 && fixedDistanceSets[i].
Distance
!= fixedDistanceSets[i - 1].
Distance
+ 1))
368
best = (vsb.ToString(), fixedDistanceSets[start].
Distance
);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (6)
523
$"{nameof(TryFindRawFixedSets)} should have only populated {nameof(r.Set)} and {nameof(r.
Distance
)}"));
742
if (combined.TryGetValue(fixedSet.
Distance
, out (RegexCharClass Set, int Count) value))
747
combined[fixedSet.
Distance
] = value;
752
combined[fixedSet.
Distance
] = (RegexCharClass.Parse(fixedSet.Set), 1);
886
return s1.
Distance
.CompareTo(s2.
Distance
);