|
44 | 44 | <param name="source">A UTF-16 encoded read-only character span.</param>
|
45 | 45 | <param name="destination">A UTF-8 encoded byte span.</param>
|
46 | 46 | <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> |
48 | 48 | <param name="replaceInvalidSequences">
|
49 | 49 | <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>
|
50 | 50 | <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> |
52 | 52 | <summary>Converts a UTF-16 character span to a UTF-8 encoded byte span.</summary>
|
53 | 53 | <returns>A value that indicates that status of the conversion.</returns>
|
54 | 54 | <remarks>
|
55 | 55 | <format type="text/markdown">< 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. |
60 | 60 |
|
61 | 61 | 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.
|
62 | 62 |
|
63 | 63 | 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.
|
64 | 64 |
|
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>. |
66 | 66 |
|
67 | 67 | ]]></format>
|
68 | 68 | </remarks>
|
@@ -91,28 +91,28 @@ If 'replaceInvalidSequences' is `true`, the method never returns <xref:System.Bu
|
91 | 91 | <Parameter Name="isFinalBlock" Type="System.Boolean" />
|
92 | 92 | </Parameters>
|
93 | 93 | <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> |
96 | 96 | <param name="bytesRead">When the method returns, the number of bytes read from <paramref name="source" />.</param>
|
97 | 97 | <param name="charsWritten">When the method returns, the number of characters written to <paramref name="destination" />.</param>
|
98 | 98 | <param name="replaceInvalidSequences">
|
99 | 99 | <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>
|
100 | 100 | <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> |
102 | 102 | <summary>Converts a UTF-8 encoded read-only byte span to a UTF-16 encoded character span.</summary>
|
103 | 103 | <returns>A value that indicates the status of the conversion.</returns>
|
104 | 104 | <remarks>
|
105 | 105 | <format type="text/markdown">< 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. |
110 | 110 |
|
111 | 111 | 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.
|
112 | 112 |
|
113 | 113 | 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.
|
114 | 114 |
|
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>. |
116 | 116 |
|
117 | 117 | ]]></format>
|
118 | 118 | </remarks>
|
|
0 commit comments