WindowsRuntimeBufferExtensions.AsBuffer Método

Definición

Sobrecargas

Nombre Description
AsBuffer(Byte[])

Devuelve un Windows. Interfaz Storage.Streams.IBuffer que representa la matriz de bytes especificada.

AsBuffer(Byte[], Int32, Int32)

Devuelve un Windows. Interfaz Storage.Streams.IBuffer que representa un intervalo de bytes en la matriz de bytes especificada.

AsBuffer(Byte[], Int32, Int32, Int32)

Devuelve un Windows. Interfaz Storage.Streams.IBuffer que representa un intervalo de bytes en la matriz de bytes especificada. Opcionalmente, establece la propiedad Length del IBuffer en un valor menor que la capacidad.

AsBuffer(Byte[])

Importante

Esta API no es conforme a CLS.

Devuelve un Windows. Interfaz Storage.Streams.IBuffer que representa la matriz de bytes especificada.

public:
[System::Runtime::CompilerServices::Extension]
 static Windows::Storage::Streams::IBuffer ^ AsBuffer(cli::array <System::Byte> ^ source);
[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IBuffer AsBuffer(this byte[] source);
[<System.CLSCompliant(false)>]
static member AsBuffer : byte[] -> Windows.Storage.Streams.IBuffer
<Extension()>
Public Function AsBuffer (source As Byte()) As IBuffer

Parámetros

source
Byte[]

Matriz que se va a representar.

Devoluciones

Windows.Storage.Streams.IBuffer

Un Windows. Interfaz Storage.Streams.IBuffer que representa la matriz de bytes especificada.

Atributos

Excepciones

source es null.

Se aplica a

AsBuffer(Byte[], Int32, Int32)

Importante

Esta API no es conforme a CLS.

Devuelve un Windows. Interfaz Storage.Streams.IBuffer que representa un intervalo de bytes en la matriz de bytes especificada.

public:
[System::Runtime::CompilerServices::Extension]
 static Windows::Storage::Streams::IBuffer ^ AsBuffer(cli::array <System::Byte> ^ source, int offset, int length);
[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IBuffer AsBuffer(this byte[] source, int offset, int length);
[<System.CLSCompliant(false)>]
static member AsBuffer : byte[] * int * int -> Windows.Storage.Streams.IBuffer
<Extension()>
Public Function AsBuffer (source As Byte(), offset As Integer, length As Integer) As IBuffer

Parámetros

source
Byte[]

Matriz que contiene el intervalo de bytes representado por IBuffer.

offset
Int32

Desplazamiento en el source que comienza el intervalo.

length
Int32

Longitud del intervalo representado por IBuffer.

Devoluciones

Windows.Storage.Streams.IBuffer

Interfaz IBuffer que representa el intervalo especificado de bytes en source.

Atributos

Excepciones

source es null.

offset o length es menor que 0 (cero).

La matriz no es lo suficientemente grande como para servir como almacén de respaldo para IBuffer; es decir, el número de bytes de source, a partir de offset, es menor que length.

Se aplica a

AsBuffer(Byte[], Int32, Int32, Int32)

Importante

Esta API no es conforme a CLS.

Devuelve un Windows. Interfaz Storage.Streams.IBuffer que representa un intervalo de bytes en la matriz de bytes especificada. Opcionalmente, establece la propiedad Length del IBuffer en un valor menor que la capacidad.

public:
[System::Runtime::CompilerServices::Extension]
 static Windows::Storage::Streams::IBuffer ^ AsBuffer(cli::array <System::Byte> ^ source, int offset, int length, int capacity);
[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IBuffer AsBuffer(this byte[] source, int offset, int length, int capacity);
[<System.CLSCompliant(false)>]
static member AsBuffer : byte[] * int * int * int -> Windows.Storage.Streams.IBuffer
<Extension()>
Public Function AsBuffer (source As Byte(), offset As Integer, length As Integer, capacity As Integer) As IBuffer

Parámetros

source
Byte[]

Matriz que contiene el intervalo de bytes representado por IBuffer.

offset
Int32

Desplazamiento en el source que comienza el intervalo.

length
Int32

Valor de la propiedad Length del IBuffer.

capacity
Int32

Tamaño del intervalo representado por IBuffer. La propiedad Capacity del IBuffer se establece en este valor.

Devoluciones

Windows.Storage.Streams.IBuffer

Interfaz IBuffer que representa el intervalo especificado de bytes en source y que tiene el valor de propiedad Length especificado.

Atributos

Excepciones

source es null.

offset, lengtho capacity es menor que 0 (cero).

length es mayor que capacity. -o-La matriz no es lo suficientemente grande como para servir como almacén de respaldo para IBuffer; es decir, el número de bytes de source, a partir de offset, es menor que length o capacity.

Se aplica a