Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Automatic port of System.Text documentation (#4625)
* Automatic port of System.Text documentation

* Apply suggestions from code review

Co-authored-by: Genevieve Warren <[email protected]>

Co-authored-by: carlossanlop <[email protected]>
Co-authored-by: Genevieve Warren <[email protected]>
  • Loading branch information
3 people authored Aug 11, 2020
commit f0db820c94e18fe0f54d54603f59a82a422822db
27 changes: 18 additions & 9 deletions xml/System.Text/Encoding.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Type Name="Encoding" FullName="System.Text.Encoding">
<Type Name="Encoding" FullName="System.Text.Encoding">
<TypeSignature Language="C#" Value="public abstract class Encoding" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netframework-1.1;netstandard-1.0;netstandard-1.1;netstandard-1.2;netstandard-1.3;netstandard-1.4;netstandard-1.6" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit Encoding extends System.Object" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netstandard-1.0;netstandard-1.1;netstandard-1.2;netstandard-1.3;netstandard-1.4;netstandard-1.6" />
<TypeSignature Language="DocId" Value="T:System.Text.Encoding" />
Expand Down Expand Up @@ -982,13 +982,22 @@ The following table lists the encodings supported by .NET. It lists each encodin
<Parameter Name="leaveOpen" Type="System.Boolean" Index="3" FrameworkAlternate="net-5.0" />
</Parameters>
<Docs>
<param name="innerStream">To be added.</param>
<param name="innerStreamEncoding">To be added.</param>
<param name="outerStreamEncoding">To be added.</param>
<param name="leaveOpen">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="innerStream">The stream to wrap.</param>
<param name="innerStreamEncoding">The encoding associated with <paramref name="innerStream" />.</param>
<param name="outerStreamEncoding">The encoding associated with the <see cref="T:System.IO.Stream" /> that's returned by this method.</param>
<param name="leaveOpen">
<see langword="true" /> if disposing the <see cref="T:System.IO.Stream" /> returned by this method should <em>not</em> dispose <paramref name="innerStream" />.</param>
<summary>Creates a <see cref="T:System.IO.Stream" /> that serves to transcode data between an inner <see cref="T:System.Text.Encoding" /> and an outer <see cref="T:System.Text.Encoding" />, similar to <see cref="M:System.Text.Encoding.Convert(System.Text.Encoding,System.Text.Encoding,System.Byte[])" />.</summary>
<returns>A stream that transcodes the contents of <paramref name="innerStream" /> as <paramref name="outerStreamEncoding" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

The returned <xref:System.IO.Stream>'s <xref:System.IO.Stream.CanRead> and <xref:System.IO.Stream.CanWrite> properties will reflect whether `innerStream` is readable or writable. If `innerStream` is full-duplex, the returned <xref:System.IO.Stream> will be as well. However, the returned <xref:System.IO.Stream> is not seekable, even if `innerStream`'s <xref:System.IO.Stream.CanSeek> property returns `true`.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DecoderFallback">
Expand Down Expand Up @@ -5064,7 +5073,7 @@ The goal is to save this file, then open and decode it as a binary stream.
<ReturnType>System.Text.Encoding</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<summary>Gets an encoding for the Latin1 character set (ISO-8859-1).</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
Expand Down
139 changes: 73 additions & 66 deletions xml/System.Text/EncodingExtensions.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Type Name="EncodingExtensions" FullName="System.Text.EncodingExtensions">
<Type Name="EncodingExtensions" FullName="System.Text.EncodingExtensions">
<TypeSignature Language="C#" Value="public static class EncodingExtensions" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit EncodingExtensions extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Text.EncodingExtensions" />
Expand Down Expand Up @@ -49,13 +49,15 @@
<Parameter Name="completed" Type="System.Boolean" RefType="out" />
</Parameters>
<Docs>
<param name="decoder">To be added.</param>
<param name="bytes">To be added.</param>
<param name="writer">To be added.</param>
<param name="flush">To be added.</param>
<param name="charsUsed">To be added.</param>
<param name="completed">To be added.</param>
<summary>To be added.</summary>
<param name="decoder">The decoder instance that can convert bytes to <see langword="char" /> values.</param>
<param name="bytes">A sequence of bytes to decode.</param>
<param name="writer">The buffer to which the decoded characters will be written.</param>
<param name="flush">
<see langword="true" /> to indicate no further data is to be converted; otherwise <see langword="false" />.</param>
<param name="charsUsed">When this method returns, contains the count of characters that were written to <paramref name="writer" />.</param>
<param name="completed">When this method returns, contains <see langword="true" /> if <paramref name="decoder" /> contains no partial internal state; otherwise, <see langword="false" />.
If <paramref name="flush" /> is <see langword="true" />, this will always be set to <see langword="true" /> when the method returns.</param>
<summary>Converts a <see cref="T:System.Buffers.ReadOnlySequence`1" /> to UTF-16 encoded characters and writes the result to <paramref name="writer" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -83,13 +85,15 @@
<Parameter Name="completed" Type="System.Boolean" RefType="out" />
</Parameters>
<Docs>
<param name="decoder">To be added.</param>
<param name="bytes">To be added.</param>
<param name="writer">To be added.</param>
<param name="flush">To be added.</param>
<param name="charsUsed">To be added.</param>
<param name="completed">To be added.</param>
<summary>To be added.</summary>
<param name="decoder">The decoder instance that can convert bytes to <see langword="char" /> values.</param>
<param name="bytes">A sequence of bytes to decode.</param>
<param name="writer">The buffer to which the decoded chars will be written.</param>
<param name="flush">
<see langword="true" /> to indicate no further data is to be converted; otherwise <see langword="false" />.</param>
<param name="charsUsed">When this method returns, contains the count of <see langword="char" />s which were written to <paramref name="writer" />.</param>
<param name="completed">When this method returns, contains <see langword="true" /> if <paramref name="decoder" /> contains no partial internal state; otherwise, <see langword="false" />.
If <paramref name="flush" /> is <see langword="true" />, this will always be set to <see langword="true" /> when the method returns.</param>
<summary>Converts a <see cref="T:System.ReadOnlySpan`1" /> to chars using <paramref name="decoder" /> and writes the result to <paramref name="writer" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -124,13 +128,14 @@
<Parameter Name="completed" Type="System.Boolean" RefType="out" />
</Parameters>
<Docs>
<param name="encoder">To be added.</param>
<param name="chars">To be added.</param>
<param name="writer">To be added.</param>
<param name="flush">To be added.</param>
<param name="bytesUsed">To be added.</param>
<param name="completed">To be added.</param>
<summary>To be added.</summary>
<param name="encoder">The encoder instance that can convert <see langword="char" /> values to bytes.</param>
<param name="chars">A sequence of characters to encode.</param>
<param name="writer">The buffer to which the encoded bytes will be written.</param>
<param name="flush">
<see langword="true" /> to indicate no further data is to be converted; otherwise <see langword="false" />.</param>
<param name="bytesUsed">When this method returns, contains the count of <see langword="byte" />s which were written to <paramref name="writer" />.</param>
<param name="completed">When this method returns, contains <see langword="true" /> if all input up until <paramref name="bytesUsed" /> was converted; otherwise, <see langword="false" />. If <paramref name="flush" /> is <see langword="true" />, this will always be set to <see langword="true" /> when the method returns.</param>
<summary>Converts a <see cref="T:System.Buffers.ReadOnlySequence`1" /> to encoded bytes and writes the result to <paramref name="writer" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -158,13 +163,15 @@
<Parameter Name="completed" Type="System.Boolean" RefType="out" />
</Parameters>
<Docs>
<param name="encoder">To be added.</param>
<param name="chars">To be added.</param>
<param name="writer">To be added.</param>
<param name="flush">To be added.</param>
<param name="bytesUsed">To be added.</param>
<param name="completed">To be added.</param>
<summary>To be added.</summary>
<param name="encoder">The encoder instance that can convert <see langword="char" /> values to bytes.</param>
<param name="chars">A sequence of characters to encode.</param>
<param name="writer">The buffer to which the encoded bytes will be written.</param>
<param name="flush">
<see langword="true" /> to indicate no further data is to be converted; otherwise <see langword="false" />.</param>
<param name="bytesUsed">When this method returns, contains the count of <see langword="byte" />s which were written to <paramref name="writer" />.</param>
<param name="completed">When this method returns, contains <see langword="true" /> if <paramref name="encoder" /> contains no partial internal state; otherwise, <see langword="false" />.
If <paramref name="flush" /> is <see langword="true" />, this will always be set to <see langword="true" /> when the method returns.</param>
<summary>Converts a <see cref="T:System.ReadOnlySpan`1" /> to bytes using <paramref name="encoder" /> and writes the result to <paramref name="writer" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -195,10 +202,10 @@
</Parameter>
</Parameters>
<Docs>
<param name="encoding">To be added.</param>
<param name="chars">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="encoding">The encoding that represents how the data in <paramref name="chars" /> should be encoded.</param>
<param name="chars">The sequence to encode to bytes.</param>
<summary>Encodes the specified <see cref="T:System.Buffers.ReadOnlySequence`1" /> into a <see cref="T:System.Byte" /> array using the specified <see cref="T:System.Text.Encoding" />.</summary>
<returns>A <see cref="T:System.Byte" /> array that represents the encoded contents of <paramref name="chars" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -230,11 +237,11 @@
<Parameter Name="writer" Type="System.Buffers.IBufferWriter&lt;System.Byte&gt;" />
</Parameters>
<Docs>
<param name="encoding">To be added.</param>
<param name="chars">To be added.</param>
<param name="writer">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="encoding">The encoding that represents how the data in <paramref name="chars" /> should be encoded.</param>
<param name="chars">The <see cref="T:System.Buffers.ReadOnlySequence`1" /> whose contents should be encoded.</param>
<param name="writer">The buffer to which the encoded bytes will be written.</param>
<summary>Decodes the specified <see cref="T:System.Buffers.ReadOnlySequence`1" /> to <see langword="byte" />s using the specified <see cref="T:System.Text.Encoding" /> and writes the result to <paramref name="writer" />.</summary>
<returns>The number of bytes written to <paramref name="writer" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -266,11 +273,11 @@
<Parameter Name="bytes" Type="System.Span&lt;System.Byte&gt;" />
</Parameters>
<Docs>
<param name="encoding">To be added.</param>
<param name="chars">To be added.</param>
<param name="bytes">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="encoding">The encoding that represents how the data in <paramref name="chars" /> should be encoded.</param>
<param name="chars">The sequence to encode to bytes.</param>
<param name="bytes">The destination buffer to which the encoded bytes will be written.</param>
<summary>Encodes the specified <see cref="T:System.Buffers.ReadOnlySequence`1" /> to <see langword="byte" />s using the specified <see cref="T:System.Text.Encoding" /> and outputs the result to <paramref name="bytes" />.</summary>
<returns>The number of bytes written to <paramref name="bytes" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand All @@ -295,10 +302,10 @@
<Parameter Name="writer" Type="System.Buffers.IBufferWriter&lt;System.Byte&gt;" />
</Parameters>
<Docs>
<param name="encoding">To be added.</param>
<param name="chars">To be added.</param>
<param name="writer">To be added.</param>
<summary>To be added.</summary>
<param name="encoding">The encoding that represents how the data in <paramref name="chars" /> should be encoded.</param>
<param name="chars">The sequence to encode to bytes.</param>
<param name="writer">The buffer to which the encoded bytes will be written.</param>
<summary>Encodes the specified <see cref="T:System.ReadOnlySpan`1" /> to <see langword="byte" />s using the specified <see cref="T:System.Text.Encoding" /> and writes the result to <paramref name="writer" />.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
Expand Down Expand Up @@ -331,11 +338,11 @@
<Parameter Name="writer" Type="System.Buffers.IBufferWriter&lt;System.Char&gt;" />
</Parameters>
<Docs>
<param name="encoding">To be added.</param>
<param name="bytes">To be added.</param>
<param name="writer">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="encoding">The encoding that represents how the data in <paramref name="bytes" /> should be decoded.</param>
<param name="bytes">The sequence whose bytes should be decoded.</param>
<param name="writer">The buffer to which the decoded chars will be written.</param>
<summary>Decodes the specified <see cref="T:System.Buffers.ReadOnlySequence`1" /> to <see langword="char" />s using the specified <see cref="T:System.Text.Encoding" /> and writes the result to <paramref name="writer" />.</summary>
<returns>The number of chars written to <paramref name="writer" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -367,11 +374,11 @@
<Parameter Name="chars" Type="System.Span&lt;System.Char&gt;" />
</Parameters>
<Docs>
<param name="encoding">To be added.</param>
<param name="bytes">To be added.</param>
<param name="chars">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="encoding">The encoding that represents how the data in <paramref name="bytes" /> is encoded.</param>
<param name="bytes">The sequence to decode to characters.</param>
<param name="chars">The destination buffer to which the decoded characters will be written.</param>
<summary>Decodes the specified <see cref="T:System.Buffers.ReadOnlySequence`1" /> to <see langword="char" />s using the specified <see cref="T:System.Text.Encoding" /> and outputs the result to <paramref name="chars" />.</summary>
<returns>The number of chars written to <paramref name="chars" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand All @@ -396,11 +403,11 @@
<Parameter Name="writer" Type="System.Buffers.IBufferWriter&lt;System.Char&gt;" />
</Parameters>
<Docs>
<param name="encoding">To be added.</param>
<param name="bytes">To be added.</param>
<param name="writer">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="encoding">The encoding that represents how the data in <paramref name="bytes" /> should be decoded.</param>
<param name="bytes">The span of bytes to decode.</param>
<param name="writer">The buffer to which the decoded chars will be written.</param>
<summary>Decodes the specified <see cref="T:System.ReadOnlySpan`1" /> to <see langword="char" />s using the specified <see cref="T:System.Text.Encoding" /> and writes the result to <paramref name="writer" />.</summary>
<returns>The number of chars written to <paramref name="writer" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -431,10 +438,10 @@
</Parameter>
</Parameters>
<Docs>
<param name="encoding">To be added.</param>
<param name="bytes">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="encoding">The encoding that represents how the data in <paramref name="bytes" /> is encoded.</param>
<param name="bytes">The sequence to decode into characters.</param>
<summary>Decodes the specified <see cref="T:System.Buffers.ReadOnlySequence`1" /> into a <see cref="T:System.String" /> using the specified <see cref="T:System.Text.Encoding" />.</summary>
<returns>A <see cref="T:System.String" /> which represents the decoded contents of <paramref name="bytes" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down
12 changes: 6 additions & 6 deletions xml/System.Text/EncodingInfo.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Type Name="EncodingInfo" FullName="System.Text.EncodingInfo">
<Type Name="EncodingInfo" FullName="System.Text.EncodingInfo">
<TypeSignature Language="C#" Value="public sealed class EncodingInfo" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit EncodingInfo extends System.Object" FrameworkAlternate="net-5.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netstandard-2.0;netstandard-2.1" />
<TypeSignature Language="DocId" Value="T:System.Text.EncodingInfo" />
Expand Down Expand Up @@ -83,11 +83,11 @@
<Parameter Name="displayName" Type="System.String" Index="3" FrameworkAlternate="net-5.0" />
</Parameters>
<Docs>
<param name="provider">To be added.</param>
<param name="codePage">To be added.</param>
<param name="name">To be added.</param>
<param name="displayName">To be added.</param>
<summary>To be added.</summary>
<param name="provider">The provider that created this <see cref="T:System.Text.EncodingInfo" /> object.</param>
<param name="codePage">The encoding codepage.</param>
<param name="name">The encoding name.</param>
<param name="displayName">The encoding display name.</param>
<summary>Constructs an <see cref="T:System.Text.EncodingInfo" /> object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down
Loading