1 instantiation of RegexReplacement
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexParser.cs (1)
145
var regexReplacement = new
RegexReplacement
(pattern, root, caps);
17 references to RegexReplacement
System.Text.RegularExpressions (17)
System\Text\RegularExpressions\Match.cs (2)
122
RegexReplacement
repl =
RegexReplacement
.GetOrCreate(regex.RegexReplacementWeakReference, replacement, regex.caps!, regex.capsize, regex.capnames!, regex.roptions);
System\Text\RegularExpressions\Regex.cs (3)
33
private WeakReference<
RegexReplacement
?>? _replref; // cached parsed replacement pattern
398
internal WeakReference<
RegexReplacement
?> RegexReplacementWeakReference =>
400
Interlocked.CompareExchange(ref _replref, new WeakReference<
RegexReplacement
?>(null), null) ??
System\Text\RegularExpressions\Regex.Replace.cs (1)
82
RegexReplacement
.GetOrCreate(RegexReplacementWeakReference, replacement, caps!, capsize, capnames!, roptions).
System\Text\RegularExpressions\RegexParser.cs (6)
137
public static
RegexReplacement
ParseReplacement(string pattern, RegexOptions options, Hashtable caps, int capsize, Hashtable capnames)
145
var
regexReplacement = new RegexReplacement(pattern, root, caps);
1386
capnum =
RegexReplacement
.LeftPortion;
1390
capnum =
RegexReplacement
.RightPortion;
1394
capnum =
RegexReplacement
.LastGroup;
1398
capnum =
RegexReplacement
.WholeString;
System\Text\RegularExpressions\RegexReplacement.cs (5)
107
public static
RegexReplacement
GetOrCreate(WeakReference<
RegexReplacement
?> replRef, string replacement, Hashtable caps,
110
if (!replRef.TryGetTarget(out
RegexReplacement
? repl) || !repl.Pattern.Equals(replacement))
302
regex.RunAllMatchesWithCallback(input, startat, ref state, (ref (
RegexReplacement
thisRef, StructListBuilder<ReadOnlyMemory<char>> segments, ReadOnlyMemory<char> inputMemory, int prevat, int count) state, Match match) =>
322
regex.RunAllMatchesWithCallback(input, startat, ref state, (ref (
RegexReplacement
thisRef, StructListBuilder<ReadOnlyMemory<char>> segments, ReadOnlyMemory<char> inputMemory, int prevat, int count) state, Match match) =>