Skip to content

Commit 08f7a0a

Browse files
authored
Remove erroneous static reference (#8883)
The docs say that only static methods can have `GeneratedRegexAttribute` applied, but this is [not true](https://github.com/dotnet/runtime/blob/main/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Parser.cs#L120-L124).
1 parent 2d50d6a commit 08f7a0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Text.RegularExpressions/GeneratedRegexAttribute.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<Docs>
2323
<summary>Instructs the System.Text.RegularExpressions source generator to generate an implementation of the specified regular expression.</summary>
2424
<remarks>
25-
<para> The generator associated with this attribute only supports C#. It only supplies an implementation when applied to static, partial, parameterless, non-generic methods that are typed to return <see cref="T:System.Text.RegularExpressions.Regex" />.
25+
<para> The generator associated with this attribute only supports C#. It only supplies an implementation when applied to partial, parameterless, non-generic methods that are typed to return <see cref="T:System.Text.RegularExpressions.Regex" />.
2626
</para>
2727
<para> When the <see cref="T:System.Text.RegularExpressions.Regex" /> supports case-insensitive matches (either by passing <see cref="F:System.Text.RegularExpressions.RegexOptions.IgnoreCase" /> or using the inline `(?i)` switch in the pattern) the regex engines will use an internal casing table to transform the passed in pattern into an equivalent case-sensitive one. For example, given the pattern `abc`, the engines will transform it to the equivalent pattern `[Aa][Bb][Cc]`. The equivalences found in this internal casing table can change over time, for example in the case new characters are added to a new version of Unicode. When using the source generator, this transformation happens at compile time, which means the casing table used to find the equivalences will depend on the target framework at compile time. This differs from the rest of the <see cref="T:System.Text.RegularExpressions.Regex" /> engines, which perform this transformation at run time, meaning they will always use casing table for the current runtime.
2828
</para>

0 commit comments

Comments
 (0)