1<?xml version="1.0" encoding="utf-8"?>
2<Type Name="Decoder" FullName="System.Text.Decoder" FullNameSP="System_Text_Decoder" Maintainer="ecma">
3  <TypeSignature Language="ILASM" Value=".class public abstract serializable Decoder extends System.Object" />
4  <TypeSignature Language="C#" Value="public abstract class Decoder" />
5  <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract serializable beforefieldinit Decoder extends System.Object" />
6  <MemberOfLibrary>BCL</MemberOfLibrary>
7  <AssemblyInfo>
8    <AssemblyName>mscorlib</AssemblyName>
9    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
10    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
11    <AssemblyVersion>2.0.0.0</AssemblyVersion>
12    <AssemblyVersion>4.0.0.0</AssemblyVersion>
13  </AssemblyInfo>
14  <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
15  <Base>
16    <BaseTypeName>System.Object</BaseTypeName>
17  </Base>
18  <Interfaces />
19  <Attributes>
20    <Attribute>
21      <AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
22    </Attribute>
23  </Attributes>
24  <Docs>
25    <example>
26      <para> The following example demonstrates using the <see cref="T:System.Text.UTF8Encoding" />
27implementation of the <see cref="T:System.Text.Decoder" /> class to convert two byte arrays to a character
28array, where one character's bytes span multiple byte arrays. This demonstrates
29how to use a <see cref="T:System.Text.Decoder" />
30in streaming-like situations.</para>
31      <code lang="C#">
32using System;
33using System.Text;
34
35public class DecoderExample
36{
37   public static void Main()
38   {
39      // These bytes in UTF-8 correspond to 3 different
40      // Unicode characters - A (U+0041), # (U+0023),
41      // and the biohazard symbol (U+2623). Note the
42      // biohazard symbol requires 3 bytes in UTF-8
43      // (in hex, e2, 98, a3). Decoders store state across
44      // multiple calls to GetChars, handling the case
45      // when one char spans multiple byte arrays.
46
47      byte[] bytes1 = { 0x41, 0x23, 0xe2 };
48      byte[] bytes2 = { 0x98, 0xa3 };
49      char[] chars = new char[3];
50
51      Decoder d = Encoding.UTF8.GetDecoder();
52      int charLen = d.GetChars(bytes1, 0, bytes1.Length,
53                               chars, 0);
54      // charLen is 2.
55
56      charLen += d.GetChars(bytes2, 0, bytes2.Length,
57                            chars, charLen);
58      // charLen is now 3.
59
60      foreach(char c in chars)
61         Console.Write("U+{0:x} ", (ushort)c);
62   }
63}
64</code>
65      <para>The output is </para>
66      <c>
67        <para>U+41 U+23 U+2623</para>
68      </c>
69    </example>
70    <remarks>
71      <attribution license="cc4" from="Microsoft" modified="false" />
72      <para>To obtain an instance of an implementation of the <see cref="T:System.Text.Decoder" /> class, the application should use the <see cref="M:System.Text.Encoding.GetDecoder" /> method of an <see cref="T:System.Text.Encoding" /> implementation. </para>
73      <para>The <see cref="M:System.Text.Decoder.GetCharCount(System.Byte*,System.Int32,System.Boolean)" /> method determines how many characters result in decoding a sequence of bytes, and the <see cref="M:System.Text.Decoder.GetChars(System.Byte*,System.Int32,System.Char*,System.Int32,System.Boolean)" /> method performs the actual decoding. There are several versions of both of these methods available in the <see cref="T:System.Text.Decoder" /> class. For more information, see <see cref="M:System.Text.Encoding.GetChars(System.Byte[])" />. A <see cref="T:System.Text.Decoder" /> object maintains state information between successive calls to GetChars or <see cref="M:System.Text.Decoder.Convert(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Int32,System.Boolean,System.Int32@,System.Int32@,System.Boolean@)" /> methods so it can correctly decode byte sequences that span blocks. The <see cref="T:System.Text.Decoder" /> also preserves trailing bytes at the end of data blocks and uses the trailing bytes in the next decoding operation. Therefore, <see cref="M:System.Text.Encoding.GetDecoder" /> and <see cref="M:System.Text.Encoding.GetEncoder" /> are useful for network transmission and file operations because those operations often deal with blocks of data instead of a complete data stream.</para>
74      <block subset="none" type="note">
75        <para>When the application is done with a stream of data, it should make sure that the state information is flushed by setting the <paramref name="flush" /> parameter to true in the appropriate method call. If an exception occurs or if the application switches streams, it should call <see cref="M:System.Text.Decoder.Reset" /> to clear the internal state of the Decoder object.</para>
76      </block>
77      <format type="text/html">
78        <h2>Version Considerations</h2>
79      </format>
80      <para>A <see cref="T:System.Text.Decoder" /> or <see cref="T:System.Text.Encoder" /> object can be serialized during a conversion operation. The state of the object is retained if it is deserialized in the same version of the .NET Framework, but lost if it is deserialized in another version. </para>
81    </remarks>
82    <summary>
83      <attribution license="cc4" from="Microsoft" modified="false" />
84      <para>Converts a sequence of encoded bytes into a set of characters.</para>
85    </summary>
86  </Docs>
87  <Members>
88    <Member MemberName=".ctor">
89      <MemberSignature Language="ILASM" Value="family rtspecialname specialname instance void .ctor()" />
90      <MemberSignature Language="C#" Value="protected Decoder ();" />
91      <MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
92      <MemberType>Constructor</MemberType>
93      <AssemblyInfo>
94        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
95        <AssemblyVersion>2.0.0.0</AssemblyVersion>
96        <AssemblyVersion>4.0.0.0</AssemblyVersion>
97      </AssemblyInfo>
98      <ReturnValue />
99      <Parameters />
100      <Docs>
101        <remarks>
102          <attribution license="cc4" from="Microsoft" modified="false" />
103          <para>To obtain an instance of an implementation of this class, the application should use the <see cref="M:System.Text.Encoding.GetDecoder" /> method of a <see cref="T:System.Text.Encoding" /> implementation.</para>
104        </remarks>
105        <summary>
106          <attribution license="cc4" from="Microsoft" modified="false" />
107          <para>Initializes a new instance of the <see cref="T:System.Text.Decoder" /> class.</para>
108        </summary>
109      </Docs>
110      <Excluded>0</Excluded>
111    </Member>
112    <Member MemberName="Convert">
113      <MemberSignature Language="C#" Value="public virtual void Convert (byte* bytes, int byteCount, char* chars, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed);" />
114      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Convert(unsigned int8* bytes, int32 byteCount, char* chars, int32 charCount, bool flush, int32 bytesUsed, int32 charsUsed, bool completed) cil managed" />
115      <MemberType>Method</MemberType>
116      <AssemblyInfo>
117        <AssemblyVersion>2.0.0.0</AssemblyVersion>
118        <AssemblyVersion>4.0.0.0</AssemblyVersion>
119      </AssemblyInfo>
120      <Attributes>
121        <Attribute>
122          <AttributeName>System.CLSCompliant(false)</AttributeName>
123        </Attribute>
124        <Attribute>
125          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
126        </Attribute>
127      </Attributes>
128      <ReturnValue>
129        <ReturnType>System.Void</ReturnType>
130      </ReturnValue>
131      <Parameters>
132        <Parameter Name="bytes" Type="System.Byte*" />
133        <Parameter Name="byteCount" Type="System.Int32" />
134        <Parameter Name="chars" Type="System.Char*" />
135        <Parameter Name="charCount" Type="System.Int32" />
136        <Parameter Name="flush" Type="System.Boolean" />
137        <Parameter Name="bytesUsed" Type="System.Int32&amp;" RefType="out" />
138        <Parameter Name="charsUsed" Type="System.Int32&amp;" RefType="out" />
139        <Parameter Name="completed" Type="System.Boolean&amp;" RefType="out" />
140      </Parameters>
141      <Docs>
142        <param name="bytes">To be added.</param>
143        <param name="byteCount">To be added.</param>
144        <param name="chars">To be added.</param>
145        <param name="charCount">To be added.</param>
146        <param name="flush">To be added.</param>
147        <param name="bytesUsed">To be added.</param>
148        <param name="charsUsed">To be added.</param>
149        <param name="completed">To be added.</param>
150        <summary>To be added.</summary>
151        <remarks>To be added.</remarks>
152        <since version=".NET 2.0" />
153      </Docs>
154    </Member>
155    <Member MemberName="Convert">
156      <MemberSignature Language="C#" Value="public virtual void Convert (byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed);" />
157      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Convert(unsigned int8[] bytes, int32 byteIndex, int32 byteCount, char[] chars, int32 charIndex, int32 charCount, bool flush, int32 bytesUsed, int32 charsUsed, bool completed) cil managed" />
158      <MemberType>Method</MemberType>
159      <AssemblyInfo>
160        <AssemblyVersion>2.0.0.0</AssemblyVersion>
161        <AssemblyVersion>4.0.0.0</AssemblyVersion>
162      </AssemblyInfo>
163      <Attributes>
164        <Attribute>
165          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
166        </Attribute>
167      </Attributes>
168      <ReturnValue>
169        <ReturnType>System.Void</ReturnType>
170      </ReturnValue>
171      <Parameters>
172        <Parameter Name="bytes" Type="System.Byte[]" />
173        <Parameter Name="byteIndex" Type="System.Int32" />
174        <Parameter Name="byteCount" Type="System.Int32" />
175        <Parameter Name="chars" Type="System.Char[]" />
176        <Parameter Name="charIndex" Type="System.Int32" />
177        <Parameter Name="charCount" Type="System.Int32" />
178        <Parameter Name="flush" Type="System.Boolean" />
179        <Parameter Name="bytesUsed" Type="System.Int32&amp;" RefType="out" />
180        <Parameter Name="charsUsed" Type="System.Int32&amp;" RefType="out" />
181        <Parameter Name="completed" Type="System.Boolean&amp;" RefType="out" />
182      </Parameters>
183      <Docs>
184        <param name="bytes">To be added.</param>
185        <param name="byteIndex">To be added.</param>
186        <param name="byteCount">To be added.</param>
187        <param name="chars">To be added.</param>
188        <param name="charIndex">To be added.</param>
189        <param name="charCount">To be added.</param>
190        <param name="flush">To be added.</param>
191        <param name="bytesUsed">To be added.</param>
192        <param name="charsUsed">To be added.</param>
193        <param name="completed">To be added.</param>
194        <summary>To be added.</summary>
195        <remarks>To be added.</remarks>
196        <since version=".NET 2.0" />
197      </Docs>
198    </Member>
199    <Member MemberName="Fallback">
200      <MemberSignature Language="C#" Value="public System.Text.DecoderFallback Fallback { get; set; }" />
201      <MemberSignature Language="ILAsm" Value=".property instance class System.Text.DecoderFallback Fallback" />
202      <MemberType>Property</MemberType>
203      <AssemblyInfo>
204        <AssemblyVersion>2.0.0.0</AssemblyVersion>
205        <AssemblyVersion>4.0.0.0</AssemblyVersion>
206      </AssemblyInfo>
207      <Attributes>
208        <Attribute>
209          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
210        </Attribute>
211      </Attributes>
212      <ReturnValue>
213        <ReturnType>System.Text.DecoderFallback</ReturnType>
214      </ReturnValue>
215      <Docs>
216        <value>To be added.</value>
217        <since version=".NET 2.0" />
218        <remarks>
219          <attribution license="cc4" from="Microsoft" modified="false" />
220          <para>The <see cref="T:System.Text.DecoderFallback" /> object represents an error handler that is invoked when an encoded byte sequence cannot be converted to a character. </para>
221        </remarks>
222        <summary>
223          <attribution license="cc4" from="Microsoft" modified="false" />
224          <para>Gets or sets a <see cref="T:System.Text.DecoderFallback" /> object for the current <see cref="T:System.Text.Decoder" /> object.</para>
225        </summary>
226      </Docs>
227    </Member>
228    <Member MemberName="FallbackBuffer">
229      <MemberSignature Language="C#" Value="public System.Text.DecoderFallbackBuffer FallbackBuffer { get; }" />
230      <MemberSignature Language="ILAsm" Value=".property instance class System.Text.DecoderFallbackBuffer FallbackBuffer" />
231      <MemberType>Property</MemberType>
232      <AssemblyInfo>
233        <AssemblyVersion>2.0.0.0</AssemblyVersion>
234        <AssemblyVersion>4.0.0.0</AssemblyVersion>
235      </AssemblyInfo>
236      <Attributes>
237        <Attribute>
238          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
239        </Attribute>
240      </Attributes>
241      <ReturnValue>
242        <ReturnType>System.Text.DecoderFallbackBuffer</ReturnType>
243      </ReturnValue>
244      <Docs>
245        <value>To be added.</value>
246        <since version=".NET 2.0" />
247        <remarks>
248          <attribution license="cc4" from="Microsoft" modified="false" />
249          <para>The <see cref="T:System.Text.DecoderFallbackBuffer" /> object represents data used by the <see cref="T:System.Text.DecoderFallback" /> object. The <see cref="T:System.Text.DecoderFallback" /> object represents an error handler that is invoked when an encoded byte sequence cannot be converted to a character. </para>
250        </remarks>
251        <summary>
252          <attribution license="cc4" from="Microsoft" modified="false" />
253          <para>Gets the <see cref="T:System.Text.DecoderFallbackBuffer" /> object associated with the current <see cref="T:System.Text.Decoder" /> object.</para>
254        </summary>
255      </Docs>
256    </Member>
257    <Member MemberName="GetCharCount">
258      <MemberSignature Language="C#" Value="public virtual int GetCharCount (byte* bytes, int count, bool flush);" />
259      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 GetCharCount(unsigned int8* bytes, int32 count, bool flush) cil managed" />
260      <MemberType>Method</MemberType>
261      <AssemblyInfo>
262        <AssemblyVersion>2.0.0.0</AssemblyVersion>
263        <AssemblyVersion>4.0.0.0</AssemblyVersion>
264      </AssemblyInfo>
265      <Attributes>
266        <Attribute>
267          <AttributeName>System.CLSCompliant(false)</AttributeName>
268        </Attribute>
269        <Attribute>
270          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
271        </Attribute>
272      </Attributes>
273      <ReturnValue>
274        <ReturnType>System.Int32</ReturnType>
275      </ReturnValue>
276      <Parameters>
277        <Parameter Name="bytes" Type="System.Byte*" />
278        <Parameter Name="count" Type="System.Int32" />
279        <Parameter Name="flush" Type="System.Boolean" />
280      </Parameters>
281      <Docs>
282        <since version=".NET 2.0" />
283        <remarks>
284          <attribution license="cc4" from="Microsoft" modified="false" />
285          <para>This method does not affect the state of the decoder.</para>
286          <para>To calculate the exact array size that <see cref="M:System.Text.Decoder.GetChars(System.Byte*,System.Int32,System.Char*,System.Int32,System.Boolean)" /> requires to store the resulting characters, the application should use <see cref="M:System.Text.Decoder.GetCharCount(System.Byte*,System.Int32,System.Boolean)" />. </para>
287          <para>If GetChars is called with <paramref name="flush" /> set to false, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call GetCharCount on a block of data immediately before calling GetChars on the same block, so that any trailing bytes from the previous block are included in the calculation.</para>
288        </remarks>
289        <summary>
290          <attribution license="cc4" from="Microsoft" modified="false" />
291          <para>When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes starting at the specified byte pointer. A parameter indicates whether to clear the internal state of the decoder after the calculation.</para>
292        </summary>
293        <returns>
294          <attribution license="cc4" from="Microsoft" modified="false" />
295          <para>The number of characters produced by decoding the specified sequence of bytes and any bytes in the internal buffer.</para>
296        </returns>
297        <param name="bytes">
298          <attribution license="cc4" from="Microsoft" modified="false" />A pointer to the first byte to decode. </param>
299        <param name="count">
300          <attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode. </param>
301        <param name="flush">
302          <attribution license="cc4" from="Microsoft" modified="false" />true to simulate clearing the internal state of the encoder after the calculation; otherwise, false. </param>
303      </Docs>
304    </Member>
305    <Member MemberName="GetCharCount">
306      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual abstract int32 GetCharCount(class System.Byte[] bytes, int32 index, int32 count)" />
307      <MemberSignature Language="C#" Value="public abstract int GetCharCount (byte[] bytes, int index, int count);" />
308      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 GetCharCount(unsigned int8[] bytes, int32 index, int32 count) cil managed" />
309      <MemberType>Method</MemberType>
310      <AssemblyInfo>
311        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
312        <AssemblyVersion>2.0.0.0</AssemblyVersion>
313        <AssemblyVersion>4.0.0.0</AssemblyVersion>
314      </AssemblyInfo>
315      <ReturnValue>
316        <ReturnType>System.Int32</ReturnType>
317      </ReturnValue>
318      <Parameters>
319        <Parameter Name="bytes" Type="System.Byte[]" />
320        <Parameter Name="index" Type="System.Int32" />
321        <Parameter Name="count" Type="System.Int32" />
322      </Parameters>
323      <Docs>
324        <exception cref="T:System.ArgumentNullException">
325          <paramref name="bytes" /> is <see langword="null" /> . </exception>
326        <exception cref="T:System.ArgumentOutOfRangeException">
327          <para>
328            <paramref name="index" /> &lt; 0. </para>
329          <para> -or- </para>
330          <para>
331            <paramref name="count" /> &lt; 0. </para>
332          <para> -or- </para>
333          <para>
334            <paramref name="index " />and <paramref name="count " />do not specify a valid range in <paramref name="bytes" /> (i.e. (<paramref name="index" /> + <paramref name="count" />) &gt; <paramref name="bytes" />.Length).</para>
335        </exception>
336        <remarks>
337          <attribution license="cc4" from="Microsoft" modified="false" />
338          <para>This method does not affect the state of the decoder.</para>
339          <para>To calculate the exact array size that <see cref="M:System.Text.Decoder.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> requires to store the resulting characters, the application should use <see cref="M:System.Text.Decoder.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. </para>
340          <para>If GetChars is called with <paramref name="flush" /> set to false, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call GetCharCount on a block of data immediately before calling GetChars on the same block, so that any trailing bytes from the previous block are included in the calculation.</para>
341        </remarks>
342        <summary>
343          <attribution license="cc4" from="Microsoft" modified="false" />
344          <para>When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.</para>
345        </summary>
346        <returns>
347          <attribution license="cc4" from="Microsoft" modified="false" />
348          <para>The number of characters produced by decoding the specified sequence of bytes and any bytes in the internal buffer.</para>
349        </returns>
350        <param name="bytes">
351          <attribution license="cc4" from="Microsoft" modified="false" />The byte array containing the sequence of bytes to decode. </param>
352        <param name="index">
353          <attribution license="cc4" from="Microsoft" modified="false" />The index of the first byte to decode. </param>
354        <param name="count">
355          <attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode. </param>
356      </Docs>
357      <Excluded>0</Excluded>
358    </Member>
359    <Member MemberName="GetCharCount">
360      <MemberSignature Language="C#" Value="public virtual int GetCharCount (byte[] bytes, int index, int count, bool flush);" />
361      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 GetCharCount(unsigned int8[] bytes, int32 index, int32 count, bool flush) cil managed" />
362      <MemberType>Method</MemberType>
363      <AssemblyInfo>
364        <AssemblyVersion>2.0.0.0</AssemblyVersion>
365        <AssemblyVersion>4.0.0.0</AssemblyVersion>
366      </AssemblyInfo>
367      <Attributes>
368        <Attribute>
369          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
370        </Attribute>
371      </Attributes>
372      <ReturnValue>
373        <ReturnType>System.Int32</ReturnType>
374      </ReturnValue>
375      <Parameters>
376        <Parameter Name="bytes" Type="System.Byte[]" />
377        <Parameter Name="index" Type="System.Int32" />
378        <Parameter Name="count" Type="System.Int32" />
379        <Parameter Name="flush" Type="System.Boolean" />
380      </Parameters>
381      <Docs>
382        <since version=".NET 2.0" />
383        <remarks>
384          <attribution license="cc4" from="Microsoft" modified="false" />
385          <para>This method does not affect the state of the decoder.</para>
386          <para>To calculate the exact array size that <see cref="M:System.Text.Decoder.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Boolean)" /> requires to store the resulting characters, the application should use <see cref="M:System.Text.Decoder.GetCharCount(System.Byte[],System.Int32,System.Int32,System.Boolean)" />. </para>
387          <para>If GetChars is called with <paramref name="flush" /> set to false, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call GetCharCount on a block of data immediately before calling GetChars on the same block, so that any trailing bytes from the previous block are included in the calculation.</para>
388        </remarks>
389        <summary>
390          <attribution license="cc4" from="Microsoft" modified="false" />
391          <para>When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array. A parameter indicates whether to clear the internal state of the decoder after the calculation.</para>
392        </summary>
393        <returns>
394          <attribution license="cc4" from="Microsoft" modified="false" />
395          <para>The number of characters produced by decoding the specified sequence of bytes and any bytes in the internal buffer.</para>
396        </returns>
397        <param name="bytes">
398          <attribution license="cc4" from="Microsoft" modified="false" />The byte array containing the sequence of bytes to decode. </param>
399        <param name="index">
400          <attribution license="cc4" from="Microsoft" modified="false" />The index of the first byte to decode. </param>
401        <param name="count">
402          <attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode. </param>
403        <param name="flush">
404          <attribution license="cc4" from="Microsoft" modified="false" />true to simulate clearing the internal state of the encoder after the calculation; otherwise, false. </param>
405      </Docs>
406    </Member>
407    <Member MemberName="GetChars">
408      <MemberSignature Language="C#" Value="public virtual int GetChars (byte* bytes, int byteCount, char* chars, int charCount, bool flush);" />
409      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 GetChars(unsigned int8* bytes, int32 byteCount, char* chars, int32 charCount, bool flush) cil managed" />
410      <MemberType>Method</MemberType>
411      <AssemblyInfo>
412        <AssemblyVersion>2.0.0.0</AssemblyVersion>
413        <AssemblyVersion>4.0.0.0</AssemblyVersion>
414      </AssemblyInfo>
415      <Attributes>
416        <Attribute>
417          <AttributeName>System.CLSCompliant(false)</AttributeName>
418        </Attribute>
419        <Attribute>
420          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
421        </Attribute>
422      </Attributes>
423      <ReturnValue>
424        <ReturnType>System.Int32</ReturnType>
425      </ReturnValue>
426      <Parameters>
427        <Parameter Name="bytes" Type="System.Byte*" />
428        <Parameter Name="byteCount" Type="System.Int32" />
429        <Parameter Name="chars" Type="System.Char*" />
430        <Parameter Name="charCount" Type="System.Int32" />
431        <Parameter Name="flush" Type="System.Boolean" />
432      </Parameters>
433      <Docs>
434        <since version=".NET 2.0" />
435        <remarks>
436          <attribution license="cc4" from="Microsoft" modified="false" />
437          <para>Remember that the <see cref="T:System.Text.Decoder" /> object saves state between calls to <see cref="M:System.Text.Decoder.GetChars(System.Byte*,System.Int32,System.Char*,System.Int32,System.Boolean)" />. When the application is done with a stream of data, it should set the <paramref name="flush" /> parameter to true to make sure that the state information is flushed. With this setting, the decoder ignores invalid bytes at the end of the data block and clears the internal buffer.</para>
438          <para>To calculate the exact buffer size that GetChars requires to store the resulting characters, the application should use <see cref="M:System.Text.Decoder.GetCharCount(System.Byte*,System.Int32,System.Boolean)" />. </para>
439          <para>If GetChars is called with <paramref name="flush" /> set to false, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call GetCharCount on a block of data immediately before calling GetChars on the same block, so that any trailing bytes from the previous block are included in the calculation.</para>
440          <para>If your application is to convert many segments of an input stream, consider using the <see cref="M:System.Text.Decoder.Convert(System.Byte*,System.Int32,System.Char*,System.Int32,System.Boolean,System.Int32@,System.Int32@,System.Boolean@)" /> method. <see cref="M:System.Text.Decoder.GetChars(System.Byte*,System.Int32,System.Char*,System.Int32,System.Boolean)" /> will throw an exception if the output buffer isn't large enough, but <see cref="M:System.Text.Decoder.Convert(System.Byte*,System.Int32,System.Char*,System.Int32,System.Boolean,System.Int32@,System.Int32@,System.Boolean@)" /> will fill as much space as possible and return the bytes read and chars written. Also see the <see cref="M:System.Text.Encoding.GetChars(System.Byte*,System.Int32,System.Char*,System.Int32)" /> topic for more comments.</para>
441        </remarks>
442        <summary>
443          <attribution license="cc4" from="Microsoft" modified="false" />
444          <para>When overridden in a derived class, decodes a sequence of bytes starting at the specified byte pointer and any bytes in the internal buffer into a set of characters that are stored starting at the specified character pointer. A parameter indicates whether to clear the internal state of the decoder after the conversion.</para>
445        </summary>
446        <returns>
447          <attribution license="cc4" from="Microsoft" modified="false" />
448          <para>The actual number of characters written at the location indicated by the <paramref name="chars" /> parameter.</para>
449        </returns>
450        <param name="bytes">
451          <attribution license="cc4" from="Microsoft" modified="false" />A pointer to the first byte to decode. </param>
452        <param name="byteCount">
453          <attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode. </param>
454        <param name="chars">
455          <attribution license="cc4" from="Microsoft" modified="false" />A pointer to the location at which to start writing the resulting set of characters. </param>
456        <param name="charCount">
457          <attribution license="cc4" from="Microsoft" modified="false" />The maximum number of characters to write. </param>
458        <param name="flush">
459          <attribution license="cc4" from="Microsoft" modified="false" />true to clear the internal state of the decoder after the conversion; otherwise, false. </param>
460      </Docs>
461    </Member>
462    <Member MemberName="GetChars">
463      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual abstract int32 GetChars(class System.Byte[] bytes, int32 byteIndex, int32 byteCount, class System.Char[] chars, int32 charIndex)" />
464      <MemberSignature Language="C#" Value="public abstract int GetChars (byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex);" />
465      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 GetChars(unsigned int8[] bytes, int32 byteIndex, int32 byteCount, char[] chars, int32 charIndex) cil managed" />
466      <MemberType>Method</MemberType>
467      <AssemblyInfo>
468        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
469        <AssemblyVersion>2.0.0.0</AssemblyVersion>
470        <AssemblyVersion>4.0.0.0</AssemblyVersion>
471      </AssemblyInfo>
472      <ReturnValue>
473        <ReturnType>System.Int32</ReturnType>
474      </ReturnValue>
475      <Parameters>
476        <Parameter Name="bytes" Type="System.Byte[]" />
477        <Parameter Name="byteIndex" Type="System.Int32" />
478        <Parameter Name="byteCount" Type="System.Int32" />
479        <Parameter Name="chars" Type="System.Char[]" />
480        <Parameter Name="charIndex" Type="System.Int32" />
481      </Parameters>
482      <Docs>
483        <exception cref="T:System.ArgumentException">
484          <para>
485            <paramref name="chars" /> does not contain sufficient space to store the decoded characters.</para>
486        </exception>
487        <exception cref="T:System.ArgumentNullException">
488          <para>
489            <paramref name="bytes " />is <see langword="null" /> . </para>
490          <para>-or- </para>
491          <para>
492            <paramref name="chars " />is <see langword="null" /> . </para>
493        </exception>
494        <exception cref="T:System.ArgumentOutOfRangeException">
495          <para>
496            <paramref name="byteIndex" /> &lt; 0. </para>
497          <para> -or- </para>
498          <para>
499            <paramref name="byteCount " /> &lt; 0. </para>
500          <para> -or- </para>
501          <para>
502            <paramref name="charIndex " /> &lt; 0. </para>
503          <para> -or- </para>
504          <para>
505            <paramref name="byteIndex" /> and <paramref name="byteCount" /> do not specify a valid range in <paramref name="bytes" /> (i.e. (<paramref name="byteIndex " />+ <paramref name="byteCount " /> ) &gt; <paramref name="bytes" />.Length). </para>
506          <para>-or- </para>
507          <para>
508            <paramref name="charIndex" /> &gt; <paramref name="chars" />.Length.</para>
509        </exception>
510        <remarks>
511          <attribution license="cc4" from="Microsoft" modified="false" />
512          <para>Remember that the <see cref="T:System.Text.Decoder" /> object saves state between calls to <see cref="M:System.Text.Decoder.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" />. When the application is done with a stream of data, it should set the <paramref name="flush" /> parameter to true to make sure that the state information is flushed. With this setting, the decoder ignores invalid bytes at the end of the data block and clears the internal buffer.</para>
513          <para>To calculate the exact array size that GetChars requires to store the resulting characters, the application should use <see cref="M:System.Text.Decoder.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. </para>
514          <para>If GetChars is called with <paramref name="flush" /> set to false, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call GetCharCount on a block of data immediately before calling GetChars on the same block, so that any trailing bytes from the previous block are included in the calculation.</para>
515          <para>If your application is to convert many segments of an input stream, consider using the <see cref="M:System.Text.Decoder.Convert(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Int32,System.Boolean,System.Int32@,System.Int32@,System.Boolean@)" /> method. <see cref="M:System.Text.Decoder.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> will throw an exception if the output buffer isn't large enough, but <see cref="M:System.Text.Decoder.Convert(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Int32,System.Boolean,System.Int32@,System.Int32@,System.Boolean@)" /> will fill as much space as possible and return the bytes read and chars written. Also see the <see cref="M:System.Text.Encoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> topic for more comments.</para>
516        </remarks>
517        <summary>
518          <attribution license="cc4" from="Microsoft" modified="false" />
519          <para>When overridden in a derived class, decodes a sequence of bytes from the specified byte array and any bytes in the internal buffer into the specified character array.</para>
520        </summary>
521        <returns>
522          <attribution license="cc4" from="Microsoft" modified="false" />
523          <para>The actual number of characters written into <paramref name="chars" />.</para>
524        </returns>
525        <param name="bytes">
526          <attribution license="cc4" from="Microsoft" modified="false" />The byte array containing the sequence of bytes to decode. </param>
527        <param name="byteIndex">
528          <attribution license="cc4" from="Microsoft" modified="false" />The index of the first byte to decode. </param>
529        <param name="byteCount">
530          <attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode. </param>
531        <param name="chars">
532          <attribution license="cc4" from="Microsoft" modified="false" />The character array to contain the resulting set of characters. </param>
533        <param name="charIndex">
534          <attribution license="cc4" from="Microsoft" modified="false" />The index at which to start writing the resulting set of characters. </param>
535      </Docs>
536      <Excluded>0</Excluded>
537    </Member>
538    <Member MemberName="GetChars">
539      <MemberSignature Language="C#" Value="public virtual int GetChars (byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, bool flush);" />
540      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 GetChars(unsigned int8[] bytes, int32 byteIndex, int32 byteCount, char[] chars, int32 charIndex, bool flush) cil managed" />
541      <MemberType>Method</MemberType>
542      <AssemblyInfo>
543        <AssemblyVersion>2.0.0.0</AssemblyVersion>
544        <AssemblyVersion>4.0.0.0</AssemblyVersion>
545      </AssemblyInfo>
546      <ReturnValue>
547        <ReturnType>System.Int32</ReturnType>
548      </ReturnValue>
549      <Parameters>
550        <Parameter Name="bytes" Type="System.Byte[]" />
551        <Parameter Name="byteIndex" Type="System.Int32" />
552        <Parameter Name="byteCount" Type="System.Int32" />
553        <Parameter Name="chars" Type="System.Char[]" />
554        <Parameter Name="charIndex" Type="System.Int32" />
555        <Parameter Name="flush" Type="System.Boolean" />
556      </Parameters>
557      <Docs>
558        <since version=".NET 2.0" />
559        <remarks>
560          <attribution license="cc4" from="Microsoft" modified="false" />
561          <para>Remember that the <see cref="T:System.Text.Decoder" /> object saves state between calls to <see cref="M:System.Text.Decoder.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Boolean)" />. When the application is done with a stream of data, it should set the <paramref name="flush" /> parameter to true to make sure that the state information is flushed. With this setting, the decoder ignores invalid bytes at the end of the data block and clears the internal buffer.</para>
562          <para>To calculate the exact array size that GetChars requires to store the resulting characters, the application should use <see cref="M:System.Text.Decoder.GetCharCount(System.Byte[],System.Int32,System.Int32,System.Boolean)" />. </para>
563          <para>If GetChars is called with <paramref name="flush" /> set to false, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call GetCharCount on a block of data immediately before calling GetChars on the same block, so that any trailing bytes from the previous block are included in the calculation.</para>
564          <para>If your application is to convert many segments of an input stream, consider using the <see cref="M:System.Text.Decoder.Convert(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Int32,System.Boolean,System.Int32@,System.Int32@,System.Boolean@)" /> method. <see cref="M:System.Text.Decoder.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Boolean)" /> will throw an exception if the output buffer isn't large enough, but <see cref="M:System.Text.Decoder.Convert(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Int32,System.Boolean,System.Int32@,System.Int32@,System.Boolean@)" /> will fill as much space as possible and return the bytes read and chars written. Also see the <see cref="M:System.Text.Encoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> topic for more comments.</para>
565        </remarks>
566        <summary>
567          <attribution license="cc4" from="Microsoft" modified="false" />
568          <para>When overridden in a derived class, decodes a sequence of bytes from the specified byte array and any bytes in the internal buffer into the specified character array. A parameter indicates whether to clear the internal state of the decoder after the conversion.</para>
569        </summary>
570        <returns>
571          <attribution license="cc4" from="Microsoft" modified="false" />
572          <para>The actual number of characters written into the <paramref name="chars" /> parameter.</para>
573        </returns>
574        <param name="bytes">
575          <attribution license="cc4" from="Microsoft" modified="false" />The byte array containing the sequence of bytes to decode. </param>
576        <param name="byteIndex">
577          <attribution license="cc4" from="Microsoft" modified="false" />The index of the first byte to decode. </param>
578        <param name="byteCount">
579          <attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode. </param>
580        <param name="chars">
581          <attribution license="cc4" from="Microsoft" modified="false" />The character array to contain the resulting set of characters. </param>
582        <param name="charIndex">
583          <attribution license="cc4" from="Microsoft" modified="false" />The index at which to start writing the resulting set of characters. </param>
584        <param name="flush">
585          <attribution license="cc4" from="Microsoft" modified="false" />true to clear the internal state of the decoder after the conversion; otherwise, false. </param>
586      </Docs>
587    </Member>
588    <Member MemberName="Reset">
589      <MemberSignature Language="C#" Value="public virtual void Reset ();" />
590      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Reset() cil managed" />
591      <MemberType>Method</MemberType>
592      <AssemblyInfo>
593        <AssemblyVersion>2.0.0.0</AssemblyVersion>
594        <AssemblyVersion>4.0.0.0</AssemblyVersion>
595      </AssemblyInfo>
596      <Attributes>
597        <Attribute>
598          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
599        </Attribute>
600      </Attributes>
601      <ReturnValue>
602        <ReturnType>System.Void</ReturnType>
603      </ReturnValue>
604      <Parameters />
605      <Docs>
606        <since version=".NET 2.0" />
607        <remarks>
608          <attribution license="cc4" from="Microsoft" modified="false" />
609          <para>This method clears the internal state of the <see cref="T:System.Text.Decoder" /> object. The method clears any state information preserved from a previous call to <see cref="M:System.Text.Decoder.GetChars(System.Byte*,System.Int32,System.Char*,System.Int32,System.Boolean)" /> or <see cref="M:System.Text.Decoder.Convert(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Int32,System.Boolean,System.Int32@,System.Int32@,System.Boolean@)" />, including trailing bytes at the end of the previous data block.</para>
610          <para>Your application should call the <see cref="M:System.Text.Decoder.Reset" /> method if it wants to reuse the same decoder even after an exception is thrown by <see cref="M:System.Text.Decoder.GetChars(System.Byte*,System.Int32,System.Char*,System.Int32,System.Boolean)" />, <see cref="M:System.Text.Decoder.Convert(System.Byte*,System.Int32,System.Char*,System.Int32,System.Boolean,System.Int32@,System.Int32@,System.Boolean@)" />, or <see cref="M:System.Text.Decoder.GetCharCount(System.Byte*,System.Int32,System.Boolean)" />, or if the decoder switches streams and begins to decode another stream.</para>
611        </remarks>
612        <summary>
613          <attribution license="cc4" from="Microsoft" modified="false" />
614          <para>When overridden in a derived class, sets the decoder back to its initial state.</para>
615        </summary>
616      </Docs>
617    </Member>
618  </Members>
619  <TypeExcluded>0</TypeExcluded>
620</Type>