WindowsRuntimeBufferExtensions.AsBuffer Metodo

Definizione

Overload

Nome Descrizione
AsBuffer(Byte[])

Restituisce un Windows. Interfaccia Storage.Streams.IBuffer che rappresenta la matrice di byte specificata.

AsBuffer(Byte[], Int32, Int32)

Restituisce un Windows. Interfaccia Storage.Streams.IBuffer che rappresenta un intervallo di byte nella matrice di byte specificata.

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

Restituisce un Windows. Interfaccia Storage.Streams.IBuffer che rappresenta un intervallo di byte nella matrice di byte specificata. Facoltativamente, imposta la proprietà Length di IBuffer su un valore minore della capacità.

AsBuffer(Byte[])

Importante

Questa API non è conforme a CLS.

Restituisce un Windows. Interfaccia Storage.Streams.IBuffer che rappresenta la matrice di byte specificata.

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

Parametri

source
Byte[]

Matrice da rappresentare.

Valori restituiti

Un Windows. Interfaccia Storage.Streams.IBuffer che rappresenta la matrice di byte specificata.

Attributi

Eccezioni

source è null.

Si applica a

AsBuffer(Byte[], Int32, Int32)

Importante

Questa API non è conforme a CLS.

Restituisce un Windows. Interfaccia Storage.Streams.IBuffer che rappresenta un intervallo di byte nella matrice di byte specificata.

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

Parametri

source
Byte[]

Matrice che contiene l'intervallo di byte rappresentato da IBuffer.

offset
Int32

Offset in cui source inizia l'intervallo.

length
Int32

Lunghezza dell'intervallo rappresentato da IBuffer.

Valori restituiti

Interfaccia IBuffer che rappresenta l'intervallo di byte specificato in source.

Attributi

Eccezioni

source è null.

offset o length è minore di 0 (zero).

La matrice non è abbastanza grande da servire come archivio di backup per IBuffer; ovvero il numero di byte in source, a partire da offset, è minore di length.

Si applica a

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

Importante

Questa API non è conforme a CLS.

Restituisce un Windows. Interfaccia Storage.Streams.IBuffer che rappresenta un intervallo di byte nella matrice di byte specificata. Facoltativamente, imposta la proprietà Length di IBuffer su un valore minore della capacità.

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

Parametri

source
Byte[]

Matrice che contiene l'intervallo di byte rappresentato da IBuffer.

offset
Int32

Offset in cui source inizia l'intervallo.

length
Int32

Valore della proprietà Length di IBuffer.

capacity
Int32

Dimensione dell'intervallo rappresentato da IBuffer. La proprietà Capacity di IBuffer è impostata su questo valore.

Valori restituiti

Interfaccia IBuffer che rappresenta l'intervallo specificato di byte in source e con il valore della proprietà Length specificato.

Attributi

Eccezioni

source è null.

offset, lengtho capacity è minore di 0 (zero).

length è maggiore di capacity. -oppure-La matrice non è sufficientemente grande da fungere da archivio di backup per IBuffer; ovvero il numero di byte in source, a partire da offset, è minore di length o capacity.

Si applica a