Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions xml/System.Text.Json/JsonElement.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ For more information, see [How to write custom serializers and deserializers wit
<returns>The value of the element as a <see cref="T:System.Boolean" />.</returns>
<remarks>
<format><![CDATA[

This method does not parse the contents of a JSON string value.

]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">This value's <see cref="P:System.Text.Json.JsonElement.ValueKind" /> is neither <see cref="F:System.Text.Json.JsonValueKind.True" /> nor <see cref="F:System.Text.Json.JsonValueKind.False" />.</exception>
Expand Down Expand Up @@ -518,8 +518,8 @@ This method does not parse the contents of a JSON string value.
## Remarks

This method does not parse the contents of a JSON string value.
On .NET Core, this method returns <xref:System.Double.PositiveInfinity?displayProperty=nameWithType> for values larger than <xref:System.Double.MaxValue?displayProperty=nameWithType>, and it returns <xref:System.Double.NegativeInfinity?displayProperty=nameWithType> for values smaller than <xref:System.Double.MinValue?displayProperty=nameWithType>.

This method returns <xref:System.Double.PositiveInfinity?displayProperty=nameWithType> for values larger than <xref:System.Double.MaxValue?displayProperty=nameWithType>, and it returns <xref:System.Double.NegativeInfinity?displayProperty=nameWithType> for values smaller than <xref:System.Double.MinValue?displayProperty=nameWithType>.

]]></format>
</remarks>
Expand Down Expand Up @@ -954,7 +954,7 @@ If a property is defined multiple times for the same object, the method matches

This method does not parse the contents of a JSON string value.

On .NET Core, this method returns <xref:System.Single.PositiveInfinity?displayProperty=nameWithType> for values larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> and <xref:System.Single.NegativeInfinity?displayProperty=nameWithType> for values smaller than <xref:System.Single.MinValue?displayProperty=nameWithType>.
This method returns <xref:System.Single.PositiveInfinity?displayProperty=nameWithType> for values larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> and <xref:System.Single.NegativeInfinity?displayProperty=nameWithType> for values smaller than <xref:System.Single.MinValue?displayProperty=nameWithType>.

]]></format>
</remarks>
Expand Down Expand Up @@ -1658,7 +1658,7 @@ This method does not parse the contents of a JSON string value.

This method does not parse the contents of a JSON string value.

On .NET Core, this method does not return `false` for values larger than <xref:System.Double.MaxValue?displayProperty=nameWithType> or smaller than <xref:System.Double.MinValue?displayProperty=nameWithType>. Instead, it returns `true` and assigns <xref:System.Double.PositiveInfinity?displayProperty=nameWithType> or <xref:System.Double.NegativeInfinity?displayProperty=nameWithType> to `value`.
This method does not return `false` for values larger than <xref:System.Double.MaxValue?displayProperty=nameWithType> or smaller than <xref:System.Double.MinValue?displayProperty=nameWithType>. Instead, it returns `true` and assigns <xref:System.Double.PositiveInfinity?displayProperty=nameWithType> or <xref:System.Double.NegativeInfinity?displayProperty=nameWithType> to `value`.

]]></format>
</remarks>
Expand Down Expand Up @@ -2081,7 +2081,7 @@ This method does not parse the contents of a JSON string value.

This method does not parse the contents of a JSON string value.

On .NET Core, this method does not return `false` for values larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> or smaller than <xref:System.Single.MinValue?displayProperty=nameWithType>). Instead, it returns `true` and assigns <xref:System.Single.PositiveInfinity?displayProperty=nameWithType> or <xref:System.Single.NegativeInfinity?displayProperty=nameWithType> to the `value` argument.
This method does not return `false` for values larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> or smaller than <xref:System.Single.MinValue?displayProperty=nameWithType>. Instead, it returns `true` and assigns <xref:System.Single.PositiveInfinity?displayProperty=nameWithType> or <xref:System.Single.NegativeInfinity?displayProperty=nameWithType> to the `value` argument.

]]></format>
</remarks>
Expand Down
52 changes: 4 additions & 48 deletions xml/System.Text.RegularExpressions/Regex.xml
Original file line number Diff line number Diff line change
Expand Up @@ -890,10 +890,8 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

> [!NOTE]
> On .NET Core and .NET 5+, calls to the `Regex.CompileToAssembly` method throw a <xref:System.PlatformNotSupportedException>. Writing out an assembly is not supported.
> In modern .NET versions, the `Regex.CompileToAssembly` method throws a <xref:System.PlatformNotSupportedException>. Writing out an assembly is not supported.

]]></format>
</remarks>
Expand Down Expand Up @@ -945,58 +943,16 @@
<Docs>
<param name="regexinfos">An array that describes the regular expressions to compile.</param>
<param name="assemblyname">The file name of the assembly.</param>
<summary>
Compiles one or more specified <see cref="T:System.Text.RegularExpressions.Regex" /> objects to a named assembly.
</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Text.RegularExpressions.Regex.CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[],System.Reflection.AssemblyName)> method generates a .NET Framework assembly in which each regular expression defined in the `regexinfos` array is represented by a class. Typically, the <xref:System.Text.RegularExpressions.Regex.CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[],System.Reflection.AssemblyName)> method is called from a separate application that generates an assembly of compiled regular expressions. Each regular expression included in the assembly has the following characteristics:

- It is derived from the <xref:System.Text.RegularExpressions.Regex> class.

- It is assigned the fully qualified name that is defined by the `fullnamespace` and `name` parameters of its corresponding <xref:System.Text.RegularExpressions.RegexCompilationInfo> object.

- It has a default (or parameterless) constructor.

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.



## Examples
The following example creates an assembly named RegexLib.dll. The assembly includes two compiled regular expressions. The first, `Utilities.RegularExpressions.DuplicatedString`, matches two identical contiguous words. The second, `Utilities.RegularExpressions.EmailAddress`, checks whether a string has the correct format to be an email address.

:::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/CompileToAssembly/Compile1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/CompileToAssembly/Compile1.vb" id="Snippet1":::

The regular expression that checks a string for duplicate words is then instantiated and used by the following example.

:::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/CompileToAssembly/Compile2.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/CompileToAssembly/Compile2.vb" id="Snippet2":::

Successful compilation of this second example requires a reference to RegexLib.dll (the assembly created by the first example) to be added to the project.

]]></format>
</remarks>
<summary>Compiles one or more specified <see cref="T:System.Text.RegularExpressions.Regex" /> objects to a named assembly.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentException">The value of the <paramref name="assemblyname" /> parameter's <see cref="P:System.Reflection.AssemblyName.Name" /> property is an empty or null string.

-or-

The regular expression pattern of one or more objects in <paramref name="regexinfos" /> contains invalid syntax.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="assemblyname" /> or <paramref name="regexinfos" /> is <see langword="null" />.</exception>
<block subset="none" type="usage">
<para>If you are developing on a system that has .NET Framework 4.5 or its point releases installed, you target .NET Framework 4, and you use the <see cref="M:System.Text.RegularExpressions.Regex.CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[],System.Reflection.AssemblyName)" /> method to create an assembly that contains compiled regular expressions. Trying to use one of the regular expressions in that assembly on a system that has .NET Framework 4 throws an exception. To work around this problem, you can do either of the following:

- Build the assembly that contains the compiled regular expressions on a system that has .NET Framework 4 instead of later versions installed.

- Instead of calling <see cref="M:System.Text.RegularExpressions.Regex.CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[],System.Reflection.AssemblyName)" /> and retrieving the compiled regular expression from an assembly, use either static or instance <see cref="T:System.Text.RegularExpressions.Regex" /> methods with the <see cref="F:System.Text.RegularExpressions.RegexOptions.Compiled" /> option when you instantiate a <see cref="T:System.Text.RegularExpressions.Regex" /> object or call a regular expression pattern matching method.</para>
</block>
<related type="Article" href="/dotnet/standard/base-types/compilation-and-reuse-in-regular-expressions">Compilation and Reuse</related>
<exception cref="T:System.PlatformNotSupportedException">
Creating an assembly of compiled regular expressions is not supported.
</exception>
<exception cref="T:System.PlatformNotSupportedException">Creating an assembly of compiled regular expressions is not supported.</exception>
</Docs>
</Member>
<Member MemberName="CompileToAssembly">
Expand Down
Loading
Loading