EncodingExtensions.GetChars Método

Definição

Sobrecargas

GetChars(Encoding, ReadOnlySequence<Byte>, IBufferWriter<Char>)

Decodifica o ReadOnlySequence<T> especificado para chars usando o Encoding especificado e grava o resultado em writer.Decodes the specified ReadOnlySequence<T> to chars using the specified Encoding and writes the result to writer.

GetChars(Encoding, ReadOnlySequence<Byte>, Span<Char>)

Decodifica o ReadOnlySequence<T> especificado para chars usando o Encoding especificado e gera o resultado para chars.Decodes the specified ReadOnlySequence<T> to chars using the specified Encoding and outputs the result to chars.

GetChars(Encoding, ReadOnlySpan<Byte>, IBufferWriter<Char>)

Decodifica o ReadOnlySpan<T> especificado para chars usando o Encoding especificado e grava o resultado em writer.Decodes the specified ReadOnlySpan<T> to chars using the specified Encoding and writes the result to writer.

GetChars(Encoding, ReadOnlySequence<Byte>, IBufferWriter<Char>)

Decodifica o ReadOnlySequence<T> especificado para chars usando o Encoding especificado e grava o resultado em writer.Decodes the specified ReadOnlySequence<T> to chars using the specified Encoding and writes the result to writer.

public:
[System::Runtime::CompilerServices::Extension]
 static long GetChars(System::Text::Encoding ^ encoding, System::Buffers::ReadOnlySequence<System::Byte> % bytes, System::Buffers::IBufferWriter<char> ^ writer);
public static long GetChars (this System.Text.Encoding encoding, ref System.Buffers.ReadOnlySequence<byte> bytes, System.Buffers.IBufferWriter<char> writer);
static member GetChars : System.Text.Encoding * ReadOnlySequence * System.Buffers.IBufferWriter<char> -> int64
<Extension()>
Public Function GetChars (encoding As Encoding, ByRef bytes As ReadOnlySequence(Of Byte), writer As IBufferWriter(Of Char)) As Long

Parâmetros

encoding
Encoding

A codificação que representa como os dados em bytes devem ser decodificados.The encoding that represents how the data in bytes should be decoded.

bytes
ReadOnlySequence<Byte>

A sequência cujos bytes devem ser decodificados.The sequence whose bytes should be decoded.

writer
IBufferWriter<Char>

O buffer no qual os caracteres decodificados serão gravados.The buffer to which the decoded chars will be written.

Retornos

Int64

O número de caracteres gravados em writer.The number of chars written to writer.

Exceções

bytes contém dados que não podem ser decodificados e encoding é configurado para gerar quando esses dados são vistos.bytes contains data that cannot be decoded and encoding is configured to throw when such data is seen.

Aplica-se a

GetChars(Encoding, ReadOnlySequence<Byte>, Span<Char>)

Decodifica o ReadOnlySequence<T> especificado para chars usando o Encoding especificado e gera o resultado para chars.Decodes the specified ReadOnlySequence<T> to chars using the specified Encoding and outputs the result to chars.

public:
[System::Runtime::CompilerServices::Extension]
 static int GetChars(System::Text::Encoding ^ encoding, System::Buffers::ReadOnlySequence<System::Byte> % bytes, Span<char> chars);
public static int GetChars (this System.Text.Encoding encoding, ref System.Buffers.ReadOnlySequence<byte> bytes, Span<char> chars);
static member GetChars : System.Text.Encoding * ReadOnlySequence * Span<char> -> int
<Extension()>
Public Function GetChars (encoding As Encoding, ByRef bytes As ReadOnlySequence(Of Byte), chars As Span(Of Char)) As Integer

Parâmetros

encoding
Encoding

A codificação que representa como os dados em bytes são codificados.The encoding that represents how the data in bytes is encoded.

bytes
ReadOnlySequence<Byte>

A sequência a ser decodificada em caracteres.The sequence to decode to characters.

chars
Span<Char>

O buffer de destino no qual os caracteres decodificados serão gravados.The destination buffer to which the decoded characters will be written.

Retornos

Int32

O número de caracteres gravados em chars.The number of chars written to chars.

Exceções

chars não é grande o suficiente para conter a forma codificada de bytes.chars is not large enough to contain the encoded form of bytes.

bytes contém dados que não podem ser decodificados e encoding é configurado para gerar quando esses dados são vistos.bytes contains data that cannot be decoded and encoding is configured to throw when such data is seen.

Aplica-se a

GetChars(Encoding, ReadOnlySpan<Byte>, IBufferWriter<Char>)

Decodifica o ReadOnlySpan<T> especificado para chars usando o Encoding especificado e grava o resultado em writer.Decodes the specified ReadOnlySpan<T> to chars using the specified Encoding and writes the result to writer.

public:
[System::Runtime::CompilerServices::Extension]
 static long GetChars(System::Text::Encoding ^ encoding, ReadOnlySpan<System::Byte> bytes, System::Buffers::IBufferWriter<char> ^ writer);
public static long GetChars (this System.Text.Encoding encoding, ReadOnlySpan<byte> bytes, System.Buffers.IBufferWriter<char> writer);
static member GetChars : System.Text.Encoding * ReadOnlySpan<byte> * System.Buffers.IBufferWriter<char> -> int64
<Extension()>
Public Function GetChars (encoding As Encoding, bytes As ReadOnlySpan(Of Byte), writer As IBufferWriter(Of Char)) As Long

Parâmetros

encoding
Encoding

A codificação que representa como os dados em bytes devem ser decodificados.The encoding that represents how the data in bytes should be decoded.

bytes
ReadOnlySpan<Byte>

O intervalo de bytes a ser decodificado.The span of bytes to decode.

writer
IBufferWriter<Char>

O buffer no qual os caracteres decodificados serão gravados.The buffer to which the decoded chars will be written.

Retornos

Int64

O número de caracteres gravados em writer.The number of chars written to writer.

Exceções

bytes contém dados que não podem ser decodificados e encoding é configurado para gerar quando esses dados são vistos.bytes contains data that cannot be decoded and encoding is configured to throw when such data is seen.

Aplica-se a