Skip to content

Commit 3b7d986

Browse files
authored
Automatic port of System.Text exceptions (dotnet#4657)
Co-authored-by: carlossanlop <[email protected]>
1 parent ed70cbd commit 3b7d986

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed

xml/System.Text.RegularExpressions/Regex.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ On .NET Core, calls to the `Regex.CompileToAssembly` method throw a <xref:System
10521052
10531053
Ordinarily, the code that instantiates and uses the compiled regular expression is found in an assembly or application that is separate from the code that creates the assembly.
10541054
1055-
Because the <xref:System.Text.RegularExpressions.Regex.CompileToAssembly%2A> method generates a .NET Framework assembly from a method call instead of using a particular language's class definition keyword (such as `class` in C# or `Class``End Class` in Visual Basic), it does not allow .NET Framework attributes to be assigned to the assembly by using the development language's standard attribute syntax. The `attributes` parameter provides an alternative method for defining the attributes that apply to the assembly. For each attribute that you want to apply to the assembly, do the following:
1055+
Because the <xref:System.Text.RegularExpressions.Regex.CompileToAssembly%2A> method generates a .NET Framework assembly from a method call instead of using a particular language's class definition keyword (such as `class` in C# or `Class`...`End Class` in Visual Basic), it does not allow .NET Framework attributes to be assigned to the assembly by using the development language's standard attribute syntax. The `attributes` parameter provides an alternative method for defining the attributes that apply to the assembly. For each attribute that you want to apply to the assembly, do the following:
10561056
10571057
1. Create an array of <xref:System.Type> objects representing the parameter types of the attribute constructor that you want to call.
10581058
@@ -1162,7 +1162,7 @@ On .NET Core, calls to the `Regex.CompileToAssembly` method throw a <xref:System
11621162
11631163
Ordinarily, the code that instantiates and uses the compiled regular expression is found in an assembly or application that is separate from the code that creates the assembly.
11641164
1165-
Because the <xref:System.Text.RegularExpressions.Regex.CompileToAssembly%2A> method generates a .NET Framework assembly from a method call instead of using a particular language's class definition keyword (such as `class` in C# or `Class``End Class` in Visual Basic), it does not allow .NET Framework attributes to be assigned to the assembly by using the development language's standard attribute syntax. The `attributes` parameter provides an alternative method for defining the attributes that apply to the assembly. For each attribute that you want to apply to the assembly, do the following:
1165+
Because the <xref:System.Text.RegularExpressions.Regex.CompileToAssembly%2A> method generates a .NET Framework assembly from a method call instead of using a particular language's class definition keyword (such as `class` in C# or `Class`...`End Class` in Visual Basic), it does not allow .NET Framework attributes to be assigned to the assembly by using the development language's standard attribute syntax. The `attributes` parameter provides an alternative method for defining the attributes that apply to the assembly. For each attribute that you want to apply to the assembly, do the following:
11661166
11671167
1. Create an array of <xref:System.Type> objects representing the parameter types of the attribute constructor that you want to call.
11681168
@@ -2871,7 +2871,7 @@ Allows an <see cref="T:System.Object" /> to attempt to free resources and perfor
28712871
28722872
The regular expression pattern for which the <xref:System.Text.RegularExpressions.Regex.Matches(System.String)> method searches is defined by the call to one of the <xref:System.Text.RegularExpressions.Regex> class constructors. For more information about the elements that can form a regular expression pattern, see [Regular Expression Language - Quick Reference](/dotnet/standard/base-types/regular-expression-language-quick-reference).
28732873
2874-
The <xref:System.Text.RegularExpressions.Regex.Matches%2A> method uses lazy evaluation to populate the returned <xref:System.Text.RegularExpressions.MatchCollection> object. Accessing members of this collection such as <xref:System.Text.RegularExpressions.MatchCollection.Count%2A?displayProperty=nameWithType> and <xref:System.Text.RegularExpressions.MatchCollection.CopyTo%2A?displayProperty=nameWithType> causes the collection to be populated immediately. To take advantage of lazy evaluation, you should iterate the collection by using a construct such as `foreach` in C# and `For Each``Next` in Visual Basic.
2874+
The <xref:System.Text.RegularExpressions.Regex.Matches%2A> method uses lazy evaluation to populate the returned <xref:System.Text.RegularExpressions.MatchCollection> object. Accessing members of this collection such as <xref:System.Text.RegularExpressions.MatchCollection.Count%2A?displayProperty=nameWithType> and <xref:System.Text.RegularExpressions.MatchCollection.CopyTo%2A?displayProperty=nameWithType> causes the collection to be populated immediately. To take advantage of lazy evaluation, you should iterate the collection by using a construct such as `foreach` in C# and `For Each`...`Next` in Visual Basic.
28752875
28762876
Because of its lazy evaluation, calling the <xref:System.Text.RegularExpressions.Regex.Matches(System.String)> method does not throw a <xref:System.Text.RegularExpressions.RegexMatchTimeoutException> exception. However, the exception is thrown when an operation is performed on the <xref:System.Text.RegularExpressions.MatchCollection> object returned by this method, if the <xref:System.Text.RegularExpressions.Regex.MatchTimeout%2A> property is not <xref:System.Text.RegularExpressions.Regex.InfiniteMatchTimeout?displayProperty=nameWithType> and a matching operation exceeds the time-out interval.
28772877
@@ -2953,7 +2953,7 @@ Allows an <see cref="T:System.Object" /> to attempt to free resources and perfor
29532953
29542954
The regular expression pattern for which the <xref:System.Text.RegularExpressions.Regex.Matches(System.String,System.Int32)> method searches is defined by the call to one of the <xref:System.Text.RegularExpressions.Regex> class constructors. For more information about the elements that can form a regular expression pattern, see [Regular Expression Language - Quick Reference](/dotnet/standard/base-types/regular-expression-language-quick-reference).
29552955
2956-
The <xref:System.Text.RegularExpressions.Regex.Matches%2A> method uses lazy evaluation to populate the returned <xref:System.Text.RegularExpressions.MatchCollection> object. Accessing members of this collection such as <xref:System.Text.RegularExpressions.MatchCollection.Count%2A?displayProperty=nameWithType> and <xref:System.Text.RegularExpressions.MatchCollection.CopyTo%2A?displayProperty=nameWithType> causes the collection to be populated immediately. To take advantage of lazy evaluation, you should iterate the collection by using a construct such as `foreach` in C# and `For Each``Next` in Visual Basic.
2956+
The <xref:System.Text.RegularExpressions.Regex.Matches%2A> method uses lazy evaluation to populate the returned <xref:System.Text.RegularExpressions.MatchCollection> object. Accessing members of this collection such as <xref:System.Text.RegularExpressions.MatchCollection.Count%2A?displayProperty=nameWithType> and <xref:System.Text.RegularExpressions.MatchCollection.CopyTo%2A?displayProperty=nameWithType> causes the collection to be populated immediately. To take advantage of lazy evaluation, you should iterate the collection by using a construct such as `foreach` in C# and `For Each`...`Next` in Visual Basic.
29572957
29582958
Because of its lazy evaluation, calling the <xref:System.Text.RegularExpressions.Regex.Matches(System.String,System.Int32)> method does not throw a <xref:System.Text.RegularExpressions.RegexMatchTimeoutException> exception. However, the exception is thrown when an operation is performed on the <xref:System.Text.RegularExpressions.MatchCollection> object returned by this method, if the <xref:System.Text.RegularExpressions.Regex.MatchTimeout%2A> property is not <xref:System.Text.RegularExpressions.Regex.InfiniteMatchTimeout?displayProperty=nameWithType> and a matching operation exceeds the time-out interval.
29592959
@@ -3039,7 +3039,7 @@ Allows an <see cref="T:System.Object" /> to attempt to free resources and perfor
30393039
30403040
The `pattern` parameter consists of regular expression language elements that symbolically describe the string to match. For more information about regular expressions, see [.NET Framework Regular Expressions](/dotnet/standard/base-types/regular-expressions) and [Regular Expression Language - Quick Reference](/dotnet/standard/base-types/regular-expression-language-quick-reference).
30413041
3042-
The <xref:System.Text.RegularExpressions.Regex.Matches%2A> method uses lazy evaluation to populate the returned <xref:System.Text.RegularExpressions.MatchCollection> object. Accessing members of this collection such as <xref:System.Text.RegularExpressions.MatchCollection.Count%2A?displayProperty=nameWithType> and <xref:System.Text.RegularExpressions.MatchCollection.CopyTo%2A?displayProperty=nameWithType> causes the collection to be populated immediately. To take advantage of lazy evaluation, you should iterate the collection by using a construct such as `foreach` in C# and `For Each``Next` in Visual Basic.
3042+
The <xref:System.Text.RegularExpressions.Regex.Matches%2A> method uses lazy evaluation to populate the returned <xref:System.Text.RegularExpressions.MatchCollection> object. Accessing members of this collection such as <xref:System.Text.RegularExpressions.MatchCollection.Count%2A?displayProperty=nameWithType> and <xref:System.Text.RegularExpressions.MatchCollection.CopyTo%2A?displayProperty=nameWithType> causes the collection to be populated immediately. To take advantage of lazy evaluation, you should iterate the collection by using a construct such as `foreach` in C# and `For Each`...`Next` in Visual Basic.
30433043
30443044
Because of its lazy evaluation, calling the <xref:System.Text.RegularExpressions.Regex.Matches(System.String,System.String)> method does not throw a <xref:System.Text.RegularExpressions.RegexMatchTimeoutException> exception. However, the exception is thrown when an operation is performed on the <xref:System.Text.RegularExpressions.MatchCollection> object returned by this method, if a time-out interval is defined by the "REGEX_DEFAULT_MATCH_TIMEOUT" property of the current application domain and a matching operation exceeds this time-out interval.
30453045
@@ -3129,7 +3129,7 @@ Allows an <see cref="T:System.Object" /> to attempt to free resources and perfor
31293129
31303130
The `pattern` parameter consists of regular expression language elements that symbolically describe the string to match. For more information about regular expressions, see [.NET Framework Regular Expressions](/dotnet/standard/base-types/regular-expressions) and [Regular Expression Language - Quick Reference](/dotnet/standard/base-types/regular-expression-language-quick-reference).
31313131
3132-
The <xref:System.Text.RegularExpressions.Regex.Matches%2A> method uses lazy evaluation to populate the returned <xref:System.Text.RegularExpressions.MatchCollection> object. Accessing members of this collection such as <xref:System.Text.RegularExpressions.MatchCollection.Count%2A?displayProperty=nameWithType> and <xref:System.Text.RegularExpressions.MatchCollection.CopyTo%2A?displayProperty=nameWithType> causes the collection to be populated immediately. To take advantage of lazy evaluation, you should iterate the collection by using a construct such as `foreach` in C# and `For Each``Next` in Visual Basic.
3132+
The <xref:System.Text.RegularExpressions.Regex.Matches%2A> method uses lazy evaluation to populate the returned <xref:System.Text.RegularExpressions.MatchCollection> object. Accessing members of this collection such as <xref:System.Text.RegularExpressions.MatchCollection.Count%2A?displayProperty=nameWithType> and <xref:System.Text.RegularExpressions.MatchCollection.CopyTo%2A?displayProperty=nameWithType> causes the collection to be populated immediately. To take advantage of lazy evaluation, you should iterate the collection by using a construct such as `foreach` in C# and `For Each`...`Next` in Visual Basic.
31333133
31343134
Because of its lazy evaluation, calling the <xref:System.Text.RegularExpressions.Regex.Matches(System.String,System.String)> method does not throw a <xref:System.Text.RegularExpressions.RegexMatchTimeoutException> exception. However, the exception is thrown when an operation is performed on the <xref:System.Text.RegularExpressions.MatchCollection> object returned by this method, if a time-out interval is defined by the "REGEX_DEFAULT_MATCH_TIMEOUT" property of the current application domain and a matching operation exceeds this time-out interval.
31353135
@@ -3221,7 +3221,7 @@ Allows an <see cref="T:System.Object" /> to attempt to free resources and perfor
32213221
32223222
The `pattern` parameter consists of regular expression language elements that symbolically describe the string to match. For more information about regular expressions, see [.NET Framework Regular Expressions](/dotnet/standard/base-types/regular-expressions) and [Regular Expression Language - Quick Reference](/dotnet/standard/base-types/regular-expression-language-quick-reference).
32233223
3224-
The <xref:System.Text.RegularExpressions.Regex.Matches%2A> method uses lazy evaluation to populate the returned <xref:System.Text.RegularExpressions.MatchCollection> object. Accessing members of this collection such as <xref:System.Text.RegularExpressions.MatchCollection.Count%2A?displayProperty=nameWithType> and <xref:System.Text.RegularExpressions.MatchCollection.CopyTo%2A?displayProperty=nameWithType> causes the collection to be populated immediately. To take advantage of lazy evaluation, you should iterate the collection by using a construct such as `foreach` in C# and `For Each``Next` in Visual Basic.
3224+
The <xref:System.Text.RegularExpressions.Regex.Matches%2A> method uses lazy evaluation to populate the returned <xref:System.Text.RegularExpressions.MatchCollection> object. Accessing members of this collection such as <xref:System.Text.RegularExpressions.MatchCollection.Count%2A?displayProperty=nameWithType> and <xref:System.Text.RegularExpressions.MatchCollection.CopyTo%2A?displayProperty=nameWithType> causes the collection to be populated immediately. To take advantage of lazy evaluation, you should iterate the collection by using a construct such as `foreach` in C# and `For Each`...`Next` in Visual Basic.
32253225
32263226
Because of its lazy evaluation, calling the <xref:System.Text.RegularExpressions.Regex.Matches%2A> method does not throw a <xref:System.Text.RegularExpressions.RegexMatchTimeoutException> exception. However, an exception is thrown when an operation is performed on the <xref:System.Text.RegularExpressions.MatchCollection> object returned by this method, if a matching operation exceeds this time-out interval specified by the`matchTimeout` parameter.
32273227

0 commit comments

Comments
 (0)