Skip to content

Commit 72635d2

Browse files
ahsonkhanRon Petrusha
authored andcommitted
Update S.T.Unicode.Utf8 APIs to correctly document the isFinalBlock (#3208)
bool.
1 parent 6a125d2 commit 72635d2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

xml/System.Text.Unicode/Utf8.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,25 @@
4444
<param name="source">A UTF-16 encoded read-only character span.</param>
4545
<param name="destination">A UTF-8 encoded byte span.</param>
4646
<param name="charsRead">When the method returns, the number of characters read from <paramref name="source" />.</param>
47-
<param name="bytesWritten">When the method returns, the number of characters written to <paramref name="destination" />.</param>
47+
<param name="bytesWritten">When the method returns, the number of bytes written to <paramref name="destination" />.</param>
4848
<param name="replaceInvalidSequences">
4949
<see langword="true" /> to replace invalid UTF-16 sequences in <paramref name="source" /> with U+FFFD; <see langword="false" /> to return <see cref="F:System.Buffers.OperationStatus.InvalidData" /> if invalid characters are found in <paramref name="source" />.</param>
5050
<param name="isFinalBlock">
51-
<see langword="true" /> if the method should not return <see cref="F:System.Buffers.OperationStatus.InvalidData" />; otherwise, <see langword="false" />.</param>
51+
<see langword="true" /> if the method should not return <see cref="F:System.Buffers.OperationStatus.NeedMoreData" />; otherwise, <see langword="false" />.</param>
5252
<summary>Converts a UTF-16 character span to a UTF-8 encoded byte span.</summary>
5353
<returns>A value that indicates that status of the conversion.</returns>
5454
<remarks>
5555
<format type="text/markdown"><![CDATA[
5656

57-
### Remarks
57+
## Remarks
5858

59-
This method corresponds to the [UTFEncoding.GetBytes](xref:System.Text.UTF8Encoding.GetBytes%2A) method, except that it has a different calling convention, different error handling mechanisms, and different performance characteristics.
59+
This method corresponds to the [UTF8Encoding.GetBytes](xref:System.Text.UTF8Encoding.GetBytes%2A) method, except that it has a different calling convention, different error handling mechanisms, and different performance characteristics.
6060

6161
If 'replaceInvalidSequences' is `true`, the method replaces any ill-formed subsequences in `source` with U+FFFD in `destination` and continues processing the remainder of the buffer. Otherwise, the method returns <xref:System.Buffers.OperationStatus.InvalidData?displayProperty=nameWithType> if it encounters any ill-formed sequences.
6262

6363
If the method returns an error code, the out parameters indicate how much of the data was successfully transcoded, and the location of the ill-formed subsequence can be deduced from these values.
6464

65-
If 'replaceInvalidSequences' is `true`, the method never returns <xref:System.Buffers.OperationStatus.InvalidData?displayProperty=nameWithType>. If 'isFinalBlock' is `true`, the method is never returns <xref:System.Buffers.OperationStatus.NeedMoreData?displayProperty=nameWithType>.
65+
If 'replaceInvalidSequences' is `true`, the method never returns <xref:System.Buffers.OperationStatus.InvalidData?displayProperty=nameWithType>. If 'isFinalBlock' is `true`, the method never returns <xref:System.Buffers.OperationStatus.NeedMoreData?displayProperty=nameWithType>.
6666

6767
]]></format>
6868
</remarks>
@@ -91,28 +91,28 @@ If 'replaceInvalidSequences' is `true`, the method never returns <xref:System.Bu
9191
<Parameter Name="isFinalBlock" Type="System.Boolean" />
9292
</Parameters>
9393
<Docs>
94-
<param name="source">A UTF-8 encoded read-only character span.</param>
95-
<param name="destination">A UTF-8 encoded byte span..</param>
94+
<param name="source">A UTF-8 encoded read-only byte span.</param>
95+
<param name="destination">A UTF-16 encoded character span.</param>
9696
<param name="bytesRead">When the method returns, the number of bytes read from <paramref name="source" />.</param>
9797
<param name="charsWritten">When the method returns, the number of characters written to <paramref name="destination" />.</param>
9898
<param name="replaceInvalidSequences">
9999
<see langword="true" /> to replace invalid UTF-8 sequences in <paramref name="source" /> with U+FFFD; <see langword="false" /> to return <see cref="F:System.Buffers.OperationStatus.InvalidData" /> if invalid characters are found in <paramref name="source" />.</param>
100100
<param name="isFinalBlock">
101-
<see langword="true" /> if the method should not return <see cref="F:System.Buffers.OperationStatus.InvalidData" />; otherwise, <see langword="false" />.</param>
101+
<see langword="true" /> if the method should not return <see cref="F:System.Buffers.OperationStatus.NeedMoreData" />; otherwise, <see langword="false" />.</param>
102102
<summary>Converts a UTF-8 encoded read-only byte span to a UTF-16 encoded character span.</summary>
103103
<returns>A value that indicates the status of the conversion.</returns>
104104
<remarks>
105105
<format type="text/markdown"><![CDATA[
106106

107-
### Remarks
107+
## Remarks
108108

109-
This method corresponds to the [UTFEncoding.GetChars](xref:System.Text.UTF8Encoding.GetChars%2A) method, except that it has a different calling convention, different error handling mechanisms, and different performance characteristics.
109+
This method corresponds to the [UTF8Encoding.GetChars](xref:System.Text.UTF8Encoding.GetChars%2A) method, except that it has a different calling convention, different error handling mechanisms, and different performance characteristics.
110110

111111
If 'replaceInvalidSequences' is `true`, the method replaces any ill-formed subsequences in `source` with U+FFFD in `destination` and continues processing the remainder of the buffer. Otherwise, the method returns <xref:System.Buffers.OperationStatus.InvalidData?displayProperty=nameWithType> if it encounters any ill-formed sequences.
112112

113113
If the method returns an error code, the out parameters indicate how much of the data was successfully transcoded, and the location of the ill-formed subsequence can be deduced from these values.
114114

115-
If 'replaceInvalidSequences' is `true`, the method never returns <xref:System.Buffers.OperationStatus.InvalidData?displayProperty=nameWithType>. If 'isFinalBlock' is `true`, the method is never returns <xref:System.Buffers.OperationStatus.NeedMoreData?displayProperty=nameWithType>.
115+
If 'replaceInvalidSequences' is `true`, the method never returns <xref:System.Buffers.OperationStatus.InvalidData?displayProperty=nameWithType>. If 'isFinalBlock' is `true`, the method never returns <xref:System.Buffers.OperationStatus.NeedMoreData?displayProperty=nameWithType>.
116116

117117
]]></format>
118118
</remarks>

0 commit comments

Comments
 (0)