AdoDotNetConnectionSupport 类

通过使用适当中的 ADO.NET 对象,提供了实现 IVsDataConnectionSupport 接口以及 IVsDataCommandIVsDataAsyncCommandIVsDataTransaction 接口的泛间接实现。

继承层次结构

Object
  Microsoft.VisualStudio.Data.Framework.ServiceProvider
    Microsoft.VisualStudio.Data.Framework.DataSiteableServiceProvider<IVsDataConnection>
      Microsoft.VisualStudio.Data.Framework.DataConnectionSupport
        Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetConnectionSupport

命名空间:  Microsoft.VisualStudio.Data.Framework.AdoDotNet
程序集:  Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)

语法

声明
Public Class AdoDotNetConnectionSupport _
    Inherits DataConnectionSupport _
    Implements IVsDataSiteableObject(Of IVsDataProvider)
public class AdoDotNetConnectionSupport : DataConnectionSupport, 
    IVsDataSiteableObject<IVsDataProvider>
public ref class AdoDotNetConnectionSupport : public DataConnectionSupport, 
    IVsDataSiteableObject<IVsDataProvider^>
type AdoDotNetConnectionSupport =  
    class 
        inherit DataConnectionSupport 
        interface IVsDataSiteableObject<IVsDataProvider>
    end
public class AdoDotNetConnectionSupport extends DataConnectionSupport implements IVsDataSiteableObject<IVsDataProvider>

AdoDotNetConnectionSupport 类型公开以下成员。

构造函数

  名称 说明
公共方法 AdoDotNetConnectionSupport 初始化 AdoDotNetConnectionSupport 类的实例。

页首

属性

  名称 说明
受保护的属性 Connection 当前连接获取支持实例使用的 DbConnection 对象。
公共属性 ConnectionString 获取或设置所需信息的字符串表示形式创建指定的数据源将连接。 (重写 DataConnectionSupport.ConnectionString。)
公共属性 ConnectionTimeout (获取或设置时间,因此,对等待生成连接在终止和超时之前尝试生成错误。 (重写 DataConnectionSupport.ConnectionTimeout。)
受保护的属性 CurrentCommand 获取当前的连接当前支持实例使用的 DbCommand 对象。
受保护的属性 CurrentTransaction 获取当前的连接当前支持实例使用的 DbTransaction 对象。
受保护的属性 InAsyncMode 获取指示连接是否为在一种异步模式。
受保护的属性 ParentProvider 获取父服务提供程序的当前实例。 (继承自 ServiceProvider。)
公共属性 ProviderObject 获取指定的连接的基础提供程序对象。 (重写 DataConnectionSupport.ProviderObject。)
受保护的属性 ServiceProvider 获取全局 Visual Studio 服务提供程序。 (继承自 DataConnectionSupport。)
公共属性 Site 获取或设置站点。 (继承自 DataSiteableServiceProvider<T>。)
公共属性 State 注意数据连接状态。 (重写 DataConnectionSupport.State。)

页首

方法

  名称 说明
公共方法 AddService(Type, ServiceCreatorCallback) 向其中添加项时指定的服务到服务的内部集合。 (继承自 ServiceProvider。)
公共方法 AddService(Type, Object) 向其中添加项时指定的服务到服务的内部集合。 (继承自 ServiceProvider。)
公共方法 AddService(Type, ServiceCreatorCallback, Boolean) 向其中添加项时指定的服务到服务的内部集合或到父服务容器。 (继承自 ServiceProvider。)
公共方法 AddService(Type, Object, Boolean) 向其中添加项时指定的服务添加到服务对象的集合或到父服务容器。 (继承自 ServiceProvider。)
受保护的方法 BeginTransactionCore 启动事务。
公共方法 Close 关闭当前数据连接。 (重写 DataConnectionSupport.Close()。)
受保护的方法 CommitTransactionCore 提交事务。
受保护的方法 CreateParameterCore 创建具有 IVsDataProvider接口的新数据参数。
受保护的方法 CreateParameterFrom 使用指定的参数的数据复制,创建具有 IVsDataProvider接口的新数据。参数,
受保护的方法 CreateService 创建基于服务指定接口类型的服务对象。 (重写 DataConnectionSupport.CreateService(IServiceContainer, Type)。)
受保护的方法 DeriveParametersCore 派生为特定命令指定的参数。
受保护的方法 DeriveParametersOn 重写派生参数的特定命令。
受保护的方法 DeriveSchemaCore 来自指定的命令返回派生的架构,指示项和布局块中特定数据读取器。
公共方法 Dispose() 数据连接释放占用的所有资源。 (继承自 DataConnectionSupport。)
受保护的方法 Dispose(Boolean) 数据连接释放占用的所有资源。 (重写 DataConnectionSupport.Dispose(Boolean)。)
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 ExecuteCore 执行指定的命令,可选择带有参数,并返回结果。IVsDataReader 对象。
受保护的方法 ExecuteWithoutResultsCore 执行指定的命令,可选择带有参数。不返回任何查询结果。
受保护的方法 Finalize 当销毁时,释放数据连接占用的所有资源支持数据连接对象。 (继承自 DataConnectionSupport。)
受保护的方法 GetCommand 从特定命令字符串的 DbCommand 对象。
受保护的方法静态成员 GetCommandType 转换从 DataCommandType 的枚举值。它在 CommandType 枚举对应的值。
公共方法 GetHashCode 作为默认哈希函数。 (继承自 Object。)
公共方法 GetService(Guid) 检索使用已指定的服务GUID的服务。 (继承自 ServiceProvider。)
公共方法 GetService(Type) 检索具有指定类型的服务。 (继承自 ServiceProvider。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 Initialize 使用指定的提供程序,这些初始化指定的 ADO.NET 连接。 (重写 DataConnectionSupport.Initialize(Object)。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法 OnMessageReceived 处理 MessageReceived 事件。 (继承自 DataConnectionSupport。)
受保护的方法 OnSiteChanged 引发 SiteChanged 事件。 (继承自 DataSiteableServiceProvider<T>。)
受保护的方法 OnStateChanged 处理 StateChanged 事件。 (继承自 DataConnectionSupport。)
公共方法 Open 打开指定的数据连接。 (重写 DataConnectionSupport.Open(Boolean)。)
受保护的方法 PrepareCore 准备在数据源中的指定命令;执行命令可以执行多次,具有不同的参数。
公共方法 RemoveService(Type) 从内部服务集合中移除项时指定的服务 (继承自 ServiceProvider。)
公共方法 RemoveService(Type, Boolean) 移除项时指定的服务从内部服务集合或从父服务容器。 (继承自 ServiceProvider。)
受保护的方法 RollbackTransactionCore 回滚或无效、事务和返回新的当前事务级别。
受保护的方法静态成员 SetParameters 添加新参数。特定 DbCommand 命令从指定 IVsDataParameter 参数。
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

事件

  名称 说明
公共事件 MessageReceived 当消息数据源收到,发生。 (继承自 DataConnectionSupport。)
公共事件 SiteChanged 当站点,发生更改。 (继承自 DataSiteableServiceProvider<T>。)
公共事件 StateChanged 数据,则连接的状态更改,发生。 (继承自 DataConnectionSupport。)

页首

显式接口实现

  名称 说明
显式接口实现私有方法 IServiceProvider.QueryService 执行为通过 IServiceProvider的实现中显示的服务的一个工厂。 (继承自 ServiceProvider。)
显式接口实现私有属性 IVsDataSiteableObject<IVsDataProvider>.Site 获取当前的连接当前支持实例使用的 IVsDataProvider 对象。

页首

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.VisualStudio.Data.Framework.AdoDotNet 命名空间