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