检索指定的字节数原始的二进制数据。
命名空间: Microsoft.VisualStudio.Data.Framework
程序集: Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)
语法
声明
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
参数
- name
类型:System.String
项目的名称可以检索原始的二进制数据。
- buffer
类型:array<System.Byte[]
指定数据,作为字节数组应将数组。如果 nullnull 引用(在 Visual Basic 中为 Nothing),此方法将返回该范围要求数组以容纳所有指定的数据。
- bufferIndex
类型:System.Int32
的索引在 buffer 参数指定的字节数组的起点。
- length
类型:System.Int32
要读取的字节数到 buffer 参数指定的字节数组。
返回值
类型:System.Int32
指示字节数的整数值读取到缓冲区中。
实现
IVsDataReader.GetBytes(String, array<Byte[], Int32, Int32)
备注
以原始的字节数组的形式时,DDEX提供程序显示数据,请调用此方法读取仅指定的字节数到现有的客户端缓冲区。这比检索所有的值提供更好的性能,在内存使所有数据读取和分配。
此方法调用 GetItemIndex 获取索引与项目名称对应然后将该索引为 GetBytes 检索请求的字节数原始的二进制数据。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。