AdoDotNetConnectionSupport 类

通过使用适当的ADO.NET对象,提供 IVsDataConnectionSupport 接口的实现和 IVsDataCommandIVsDataAsyncCommandIVsDataTransaction 接口的一个间接实现。

继承层次结构

System.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 命名空间