此选件类有效地是一个 convienent 方式访问结果列。 它缓存列序号。
若要使用此选件类,请创建静态实例时,通过在列名传递给构造函数,并使用 GetXXX 方法运行时检索值。
在第一 GetXXX() 调用之后,将缓存列数。
应重新使用此对象在将来的所有调用结果同一形状设置。
继承层次结构
System.Object
Microsoft.TeamFoundation.Framework.Server.SqlColumnBinder
命名空间: Microsoft.TeamFoundation.Framework.Server
程序集: Microsoft.TeamFoundation.Framework.Server(在 Microsoft.TeamFoundation.Framework.Server.dll 中)
语法
声明
Public Class SqlColumnBinder
public class SqlColumnBinder
SqlColumnBinder 类型公开以下成员。
构造函数
名称 | 说明 | |
---|---|---|
![]() |
SqlColumnBinder | 创建 SqlColumnReader 以读取名为列 |
页首
属性
名称 | 说明 | |
---|---|---|
![]() |
ColumnName | 此联编程序也是绑定的列的名称。 |
页首
方法
名称 | 说明 | |
---|---|---|
![]() |
ColumnExists | 选定列是否在结果。 |
![]() |
Equals | 确定指定的对象是否等于当前对象。 (继承自 Object。) |
![]() |
Finalize | 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。) |
![]() |
GetBoolean(DbDataReader) | 检索该列的值作为 bool 给定读取器。 如果该列为空,则将引发异常 |
![]() |
GetBoolean(DbDataReader, Boolean) | 检索该列的值作为 bool 给定读取器。 如果该列为空,则将引发异常 |
![]() |
GetBoolean(DbDataReader, Boolean, Boolean%) | 检索该列的值作为 bool 给定读取器。 如果该值为空,则将输出参数设置为 true。 |
![]() |
GetByte(DbDataReader) | 检索该列的值作为 int 给定读取器。 如果该列为空,则将引发异常 |
![]() |
GetByte(DbDataReader, Byte) | 检索该列的值作为 int 给定读取器。 如果该列为空,则将引发异常 |
![]() |
GetByte(DbDataReader, Byte, Byte) | 检索该列的值作为 int 给定读取器。 如果该列为空,则将引发异常 |
![]() |
GetBytes(DbDataReader, Boolean) | |
![]() |
GetBytes(DbDataReader, Int64, array<Byte[], Int32, Int32) | 读取字节区块从列。当使用 ExecuteReader (CommandBehavior.SequentialAccess),您有效可以从 BLOB 列的流字节。 |
![]() |
GetDateTime(DbDataReader) | |
![]() |
GetDateTime(DbDataReader, DateTime) | |
![]() |
GetDateTimeOffset | |
![]() |
GetDouble(DbDataReader) | 检索该列的值为二进制给定读取器。如果该列为空,则将引发异常。 |
![]() |
GetDouble(DbDataReader, Double) | 检索该列的值为二进制给定阅读器 |
![]() |
GetFloat(DbDataReader) | 检索该列的值作为浮点给定读取器。 如果该列为空,则将引发异常 |
![]() |
GetFloat(DbDataReader, Single) | 检索该列的值作为浮点给定读取器。 |
![]() |
GetFloat(DbDataReader, Single, Single) | 检索该列的值作为浮点给定读取器。 |
![]() |
GetGuid(DbDataReader) | |
![]() |
GetGuid(DbDataReader, Boolean) | 检索该列的值作为 GUID 给定读取器。 如果 allowNulls 为 true,将返回空值为 null 的 GUID。 否则,因此,如果遇到 null,SQLException 会引发。 |
![]() |
GetGuid(DbDataReader, Boolean, Guid) | 检索该列的值作为 GUID 给定读取器。 如果 allowNulls 为 true,将返回空值为 null 的 GUID。 否则,因此,如果遇到 null,SQLException 会引发。 |
![]() |
GetHashCode | 作为默认哈希函数。 (继承自 Object。) |
![]() |
GetInt16(DbDataReader) | 检索该列的值作为 Int16 给定读取器。 异常在结果将引发异常,则列为空或不会找到。 |
![]() |
GetInt16(DbDataReader, Int16) | 检索该列的值作为 Int16 给定读取器。 如果在结果未找到,则将引发异常。 |
![]() |
GetInt16(DbDataReader, Int16, Int16) | 检索该列的值作为 Int16 给定读取器。 |
![]() |
GetInt32(DbDataReader) | 检索该列的值作为 int 给定读取器。 如果该列为空,则将引发异常 |
![]() |
GetInt32(DbDataReader, Int32) | 检索该列的值作为 int 给定读取器。 |
![]() |
GetInt32(DbDataReader, Int32, Int32) | 检索该列的值作为 int 给定读取器。 |
![]() |
GetInt64(DbDataReader) | 检索该列的值作为 int 给定读取器。 如果该列为空,则将引发异常 |
![]() |
GetInt64(DbDataReader, Int64) | 检索该列的值作为 int 给定读取器。 |
![]() |
GetInt64(DbDataReader, Int64, Int64) | 检索该列的值作为 int64 给定读取器。 |
![]() |
GetObject | |
![]() |
GetOrdinal | |
![]() |
GetString(DbDataReader, Boolean) | 检索该列的值作为字符串给定读取器。 如果 allowNulls 为 true,将 null 值的形式返回空字符串。 否则,因此,如果遇到 null,SQLException 会引发。 |
![]() |
GetString(DbDataReader, String) | 检索该列的值作为字符串给定读取器。 如果 DB 列为空,将返回。 |
![]() |
GetTimeSpan(SqlDataReader) | |
![]() |
GetTimeSpan(SqlDataReader, TimeSpan) | |
![]() |
GetTimeSpan(SqlDataReader, TimeSpan, TimeSpan) | |
![]() |
GetType | 获取当前实例的 Type。 (继承自 Object。) |
![]() |
IsInitialized | 返回值列是否解析到其序号值。 |
![]() |
IsNull | |
![]() |
MemberwiseClone | 创建当前 Object 的浅表副本。 (继承自 Object。) |
![]() |
ToString | 返回表示当前对象的字符串。 (继承自 Object。) |
页首
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。