-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Utf8.xml
252 lines (240 loc) · 19.5 KB
/
Utf8.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<Type Name="Utf8" FullName="System.Text.Unicode.Utf8">
<TypeSignature Language="C#" Value="public static class Utf8" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Utf8 extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Text.Unicode.Utf8" />
<TypeSignature Language="VB.NET" Value="Public Class Utf8" />
<TypeSignature Language="F#" Value="type Utf8 = class" />
<TypeSignature Language="C++ CLI" Value="public ref class Utf8 abstract sealed" />
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides static methods that convert chunked data between UTF-8 and UTF-16 encodings.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="FromUtf16">
<MemberSignature Language="C#" Value="public static System.Buffers.OperationStatus FromUtf16 (ReadOnlySpan<char> source, Span<byte> destination, out int charsRead, out int bytesWritten, bool replaceInvalidSequences = true, bool isFinalBlock = true);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Buffers.OperationStatus FromUtf16(valuetype System.ReadOnlySpan`1<char> source, valuetype System.Span`1<unsigned int8> destination, [out] int32& charsRead, [out] int32& bytesWritten, bool replaceInvalidSequences, bool isFinalBlock) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Text.Unicode.Utf8.FromUtf16(System.ReadOnlySpan{System.Char},System.Span{System.Byte},System.Int32@,System.Int32@,System.Boolean,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromUtf16 (source As ReadOnlySpan(Of Char), destination As Span(Of Byte), ByRef charsRead As Integer, ByRef bytesWritten As Integer, Optional replaceInvalidSequences As Boolean = true, Optional isFinalBlock As Boolean = true) As OperationStatus" />
<MemberSignature Language="F#" Value="static member FromUtf16 : ReadOnlySpan<char> * Span<byte> * int * int * bool * bool -> System.Buffers.OperationStatus" Usage="System.Text.Unicode.Utf8.FromUtf16 (source, destination, charsRead, bytesWritten, replaceInvalidSequences, isFinalBlock)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Buffers.OperationStatus</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.ReadOnlySpan<System.Char>" />
<Parameter Name="destination" Type="System.Span<System.Byte>" />
<Parameter Name="charsRead" Type="System.Int32" RefType="out" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" />
<Parameter Name="replaceInvalidSequences" Type="System.Boolean" />
<Parameter Name="isFinalBlock" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="source">A UTF-16 encoded read-only character span.</param>
<param name="destination">A UTF-8 encoded byte span.</param>
<param name="charsRead">When the method returns, the number of characters read from <paramref name="source" />.</param>
<param name="bytesWritten">When the method returns, the number of bytes written to <paramref name="destination" />.</param>
<param name="replaceInvalidSequences">
<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>
<param name="isFinalBlock">
<see langword="true" /> if the method should not return <see cref="F:System.Buffers.OperationStatus.NeedMoreData" />; otherwise, <see langword="false" />.</param>
<summary>Converts a UTF-16 character span to a UTF-8 encoded byte span.</summary>
<returns>A value that indicates that status of the conversion.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
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.
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.
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.
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>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsValid">
<MemberSignature Language="C#" Value="public static bool IsValid (ReadOnlySpan<byte> value);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool IsValid(valuetype System.ReadOnlySpan`1<unsigned int8> value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Text.Unicode.Utf8.IsValid(System.ReadOnlySpan{System.Byte})" />
<MemberSignature Language="VB.NET" Value="Public Shared Function IsValid (value As ReadOnlySpan(Of Byte)) As Boolean" />
<MemberSignature Language="F#" Value="static member IsValid : ReadOnlySpan<byte> -> bool" Usage="System.Text.Unicode.Utf8.IsValid value" />
<MemberSignature Language="C++ CLI" Value="public:
 static bool IsValid(ReadOnlySpan<System::Byte> value);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.ReadOnlySpan<System.Byte>" Index="0" FrameworkAlternate="net-8.0;net-9.0" />
</Parameters>
<Docs>
<param name="value">The <see cref="T:System.ReadOnlySpan`1" /> string.</param>
<summary>Validates that the value is well-formed UTF-8.</summary>
<returns>
<see langword="true" /> if value is well-formed UTF-8, <see langword="false" /> otherwise.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ToUtf16">
<MemberSignature Language="C#" Value="public static System.Buffers.OperationStatus ToUtf16 (ReadOnlySpan<byte> source, Span<char> destination, out int bytesRead, out int charsWritten, bool replaceInvalidSequences = true, bool isFinalBlock = true);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Buffers.OperationStatus ToUtf16(valuetype System.ReadOnlySpan`1<unsigned int8> source, valuetype System.Span`1<char> destination, [out] int32& bytesRead, [out] int32& charsWritten, bool replaceInvalidSequences, bool isFinalBlock) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Text.Unicode.Utf8.ToUtf16(System.ReadOnlySpan{System.Byte},System.Span{System.Char},System.Int32@,System.Int32@,System.Boolean,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function ToUtf16 (source As ReadOnlySpan(Of Byte), destination As Span(Of Char), ByRef bytesRead As Integer, ByRef charsWritten As Integer, Optional replaceInvalidSequences As Boolean = true, Optional isFinalBlock As Boolean = true) As OperationStatus" />
<MemberSignature Language="F#" Value="static member ToUtf16 : ReadOnlySpan<byte> * Span<char> * int * int * bool * bool -> System.Buffers.OperationStatus" Usage="System.Text.Unicode.Utf8.ToUtf16 (source, destination, bytesRead, charsWritten, replaceInvalidSequences, isFinalBlock)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Buffers.OperationStatus</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.ReadOnlySpan<System.Byte>" />
<Parameter Name="destination" Type="System.Span<System.Char>" />
<Parameter Name="bytesRead" Type="System.Int32" RefType="out" />
<Parameter Name="charsWritten" Type="System.Int32" RefType="out" />
<Parameter Name="replaceInvalidSequences" Type="System.Boolean" />
<Parameter Name="isFinalBlock" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="source">A UTF-8 encoded read-only byte span.</param>
<param name="destination">A UTF-16 encoded character span.</param>
<param name="bytesRead">When the method returns, the number of bytes read from <paramref name="source" />.</param>
<param name="charsWritten">When the method returns, the number of characters written to <paramref name="destination" />.</param>
<param name="replaceInvalidSequences">
<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>
<param name="isFinalBlock">
<see langword="true" /> if the method should not return <see cref="F:System.Buffers.OperationStatus.NeedMoreData" />; otherwise, <see langword="false" />.</param>
<summary>Converts a UTF-8 encoded read-only byte span to a UTF-16 encoded character span.</summary>
<returns>A value that indicates the status of the conversion.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
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.
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.
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.
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>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TryWrite">
<MemberSignature Language="C#" Value="public static bool TryWrite (Span<byte> destination, ref System.Text.Unicode.Utf8.TryWriteInterpolatedStringHandler handler, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool TryWrite(valuetype System.Span`1<unsigned int8> destination, valuetype System.Text.Unicode.Utf8/TryWriteInterpolatedStringHandler& handler, [out] int32& bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Text.Unicode.Utf8.TryWrite(System.Span{System.Byte},System.Text.Unicode.Utf8.TryWriteInterpolatedStringHandler@,System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function TryWrite (destination As Span(Of Byte), ByRef handler As Utf8.TryWriteInterpolatedStringHandler, ByRef bytesWritten As Integer) As Boolean" />
<MemberSignature Language="F#" Value="static member TryWrite : Span<byte> * TryWriteInterpolatedStringHandler * int -> bool" Usage="System.Text.Unicode.Utf8.TryWrite (destination, handler, bytesWritten)" />
<MemberSignature Language="C++ CLI" Value="public:
 static bool TryWrite(Span<System::Byte> destination, System::Text::Unicode::Utf8::TryWriteInterpolatedStringHandler % handler, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="destination" Type="System.Span<System.Byte>" Index="0" FrameworkAlternate="net-8.0;net-9.0" />
<Parameter Name="handler" Type="System.Text.Unicode.Utf8+TryWriteInterpolatedStringHandler" RefType="ref" Index="1" FrameworkAlternate="net-8.0;net-9.0">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.InterpolatedStringHandlerArgument("destination")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.InterpolatedStringHandlerArgument("destination")>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" Index="2" FrameworkAlternate="net-8.0;net-9.0" />
</Parameters>
<Docs>
<param name="destination">The span to which the interpolated string should be formatted.</param>
<param name="handler">The interpolated string.</param>
<param name="bytesWritten">When this method returns, contains the number of characters written to the span.</param>
<summary>Writes the specified interpolated string to the UTF-8 byte span.</summary>
<returns>
<see langword="true" /> if the entire interpolated string could be formatted successfully; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TryWrite">
<MemberSignature Language="C#" Value="public static bool TryWrite (Span<byte> destination, IFormatProvider? provider, ref System.Text.Unicode.Utf8.TryWriteInterpolatedStringHandler handler, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool TryWrite(valuetype System.Span`1<unsigned int8> destination, class System.IFormatProvider provider, valuetype System.Text.Unicode.Utf8/TryWriteInterpolatedStringHandler& handler, [out] int32& bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Text.Unicode.Utf8.TryWrite(System.Span{System.Byte},System.IFormatProvider,System.Text.Unicode.Utf8.TryWriteInterpolatedStringHandler@,System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function TryWrite (destination As Span(Of Byte), provider As IFormatProvider, ByRef handler As Utf8.TryWriteInterpolatedStringHandler, ByRef bytesWritten As Integer) As Boolean" />
<MemberSignature Language="F#" Value="static member TryWrite : Span<byte> * IFormatProvider * TryWriteInterpolatedStringHandler * int -> bool" Usage="System.Text.Unicode.Utf8.TryWrite (destination, provider, handler, bytesWritten)" />
<MemberSignature Language="C++ CLI" Value="public:
 static bool TryWrite(Span<System::Byte> destination, IFormatProvider ^ provider, System::Text::Unicode::Utf8::TryWriteInterpolatedStringHandler % handler, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="destination" Type="System.Span<System.Byte>" Index="0" FrameworkAlternate="net-8.0;net-9.0" />
<Parameter Name="provider" Type="System.IFormatProvider" Index="1" FrameworkAlternate="net-8.0;net-9.0">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="handler" Type="System.Text.Unicode.Utf8+TryWriteInterpolatedStringHandler" RefType="ref" Index="2" FrameworkAlternate="net-8.0;net-9.0">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.InterpolatedStringHandlerArgument(new System.String[] { "destination", "provider" })]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.InterpolatedStringHandlerArgument(new System.String[] { "destination", "provider" })>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="net-8.0;net-9.0" />
</Parameters>
<Docs>
<param name="destination">The span to which the interpolated string should be formatted.</param>
<param name="provider">An object that supplies culture-specific formatting information.</param>
<param name="handler">The interpolated string.</param>
<param name="bytesWritten">When this method returns, contains the number of characters written to the span.</param>
<summary>Writes the specified interpolated string to the UTF-8 byte span.</summary>
<returns>
<see langword="true" /> if the entire interpolated string could be formatted successfully; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>