Condividi tramite


Metodo DataReader.GetBytes (String, array<Byte[], Int32, Int32)

Recupera un numero specificato di byte dati binari da rivedere.

Spazio dei nomi:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Sintassi

'Dichiarazione
Public Overridable Function GetBytes ( _
    name As String, _
    buffer As Byte(), _
    bufferIndex As Integer, _
    length As Integer _
) As Integer
public virtual int GetBytes(
    string name,
    byte[] buffer,
    int bufferIndex,
    int length
)
public:
virtual int GetBytes(
    String^ name, 
    array<unsigned char>^ buffer, 
    int bufferIndex, 
    int length
)
abstract GetBytes : 
        name:string * 
        buffer:byte[] * 
        bufferIndex:int * 
        length:int -> int  
override GetBytes : 
        name:string * 
        buffer:byte[] * 
        bufferIndex:int * 
        length:int -> int
public function GetBytes(
    name : String, 
    buffer : byte[], 
    bufferIndex : int, 
    length : int
) : int

Parametri

  • name
    Tipo: String

    Il nome dell'elemento per il quale recuperare i dati binari da esaminare.

  • buffer
    Tipo: array<Byte[]

    Una matrice in cui è specificato i dati, come matrice di byte, deve essere inserita. Se nullriferimento null (Nothing in Visual Basic), questo metodo restituisce la dimensione richiesta della matrice per contenere tutti dati specificati.

  • bufferIndex
    Tipo: Int32

    Indice del punto iniziale della matrice di byte specificata nel parametro buffer.

  • length
    Tipo: Int32

    Numero di byte da leggere nella matrice di byte specificata nel parametro buffer.

Valore restituito

Tipo: Int32
Un intero che indica il numero di byte lettura nel buffer.

Implementa

IVsDataReader.GetBytes(String, array<Byte[], Int32, Int32)

Note

Quando i dati sono verificati dal provider di DDEX sotto forma di byte non elaborati, chiamare questo metodo in sola lettura un determinato numero di byte in un buffer lato client esistente. Ciò offre prestazioni migliori rispetto alla semplice recuperando il valore di qualsiasi, in modo che tutti i dati venga letto e a allocata la memoria.

Questo metodo chiama GetItemIndex per ottenere l'indice che corrisponde al nome di elemento e quindi passa tale indice a GetBytes per recuperare il numero di byte necessari dati binari da rivedere.

Sicurezza di .NET Framework

Vedere anche

Riferimenti

DataReader Classe

Overload GetBytes

Spazio dei nomi Microsoft.VisualStudio.Data.Framework

GetBytes