AdoDotNetConnectionSupport 类

定义

表示 IVsDataConnectionSupport 接口的实现,并使用适当的 ADO .NET 对象间接实现 IVsDataCommand、IVsDataAsyncCommand 和 IVsDataTransaction 接口。

public ref class AdoDotNetConnectionSupport : Microsoft::VisualStudio::Data::Framework::DataConnectionSupport, Microsoft::VisualStudio::Data::Core::IVsDataSiteableObject<Microsoft::VisualStudio::Data::Core::IVsDataProvider ^>
public class AdoDotNetConnectionSupport : Microsoft.VisualStudio.Data.Framework.DataConnectionSupport, Microsoft.VisualStudio.Data.Core.IVsDataSiteableObject<Microsoft.VisualStudio.Data.Core.IVsDataProvider>
type AdoDotNetConnectionSupport = class
    inherit DataConnectionSupport
    interface IVsDataSiteableObject<IVsDataProvider>
Public Class AdoDotNetConnectionSupport
Inherits DataConnectionSupport
Implements IVsDataSiteableObject(Of IVsDataProvider)
继承
实现

构造函数

AdoDotNetConnectionSupport()

初始化 AdoDotNetConnectionSupport 类的实例。

属性

Connection

获取 DbConnection 当前连接支持实例正在使用的对象。

ConnectionString

获取或设置建立指定数据源连接所需的信息的字符串表示形式。

ConnectionTimeout

获取或设置在终止尝试并生成超时错误之前等待建立连接的时间量(以秒为单位)。

CurrentCommand

获取 DbCommand 当前连接支持实例当前正在使用的对象。

CurrentTransaction

获取 DbTransaction 当前连接支持实例当前正在使用的对象。

InAsyncMode

获取一个值,该值指示连接是否处于异步模式。

ParentProvider

获取父服务提供程序的当前实例。

(继承自 ServiceProvider)
ProviderObject

获取指定连接的基础提供程序对象。

ServiceProvider

获取全局 Visual Studio 服务提供程序。

(继承自 DataConnectionSupport)
Site

获取或设置站点。

(继承自 DataSiteableServiceProvider<T>)
State

获取数据连接的状态。

方法

AddService(Type, Object)

将指定的服务添加到服务的内部集合。

(继承自 ServiceProvider)
AddService(Type, Object, Boolean)

将指定的服务添加到服务对象的集合或父服务容器。

(继承自 ServiceProvider)
AddService(Type, ServiceCreatorCallback)

将指定的服务添加到服务的内部集合。

(继承自 ServiceProvider)
AddService(Type, ServiceCreatorCallback, Boolean)

将指定的服务添加到服务的内部集合或父服务容器。

(继承自 ServiceProvider)
BeginTransactionCore()

启动事务。

Close()

关闭当前数据连接。

CommitTransactionCore()

提交事务。

CreateParameterCore()

使用接口 IVsDataProvider创建新的数据参数。

CreateParameterFrom(DbParameter)

使用指定数据参数的副本使用接口 IVsDataProvider创建新的数据参数。

CreateService(IServiceContainer, Type)

基于指定的接口服务类型创建新的服务对象。

DeriveParametersCore(String, DataCommandType, Int32)

派生可为给定命令指定的参数。

DeriveParametersOn(DbCommand)

重写以从给定命令派生参数。

DeriveSchemaCore(String, DataCommandType, IVsDataParameter[], Int32)

派生从指定命令返回的架构,指示给定数据读取器中项和块的布局。

Dispose()

释放数据连接保留的所有资源。

(继承自 DataConnectionSupport)
Dispose(Boolean)

释放数据连接保留的所有资源。

ExecuteCore(String, DataCommandType, IVsDataParameter[], Int32)

使用参数执行指定的命令(可选),并将结果作为 IVsDataReader 对象返回。

ExecuteWithoutResultsCore(String, DataCommandType, IVsDataParameter[], Int32)

使用参数执行指定的命令(可选)。 不返回任何查询结果。

GetCommand(String, DataCommandType, IVsDataParameter[], Int32)

根据给定的 DbCommand 命令字符串构造对象。

GetCommandType(DataCommandType)

将 枚举值从 DataCommandType 转换为枚举中的 CommandType 相应值。

GetService(Guid)

检索具有指定服务 GUID 的服务。

(继承自 ServiceProvider)
GetService(Type)

检索指定类型的服务。

(继承自 ServiceProvider)
Initialize(Object)

使用指定的提供程序初始化指定的 ADO.NET 连接。

OnMessageReceived(DataConnectionMessageReceivedEventArgs)

处理 MessageReceived 事件。

(继承自 DataConnectionSupport)
OnSiteChanged(EventArgs)

引发 SiteChanged 事件。

(继承自 DataSiteableServiceProvider<T>)
OnStateChanged(DataConnectionStateChangedEventArgs)

处理 StateChanged 事件。

(继承自 DataConnectionSupport)
Open(Boolean)

打开指定的数据连接。

PrepareCore(String, DataCommandType, IVsDataParameter[], Int32)

准备要执行的数据源上的指定命令;可以使用不同的参数多次执行 命令。

RemoveService(Type)

从内部服务集合中删除指定的服务

(继承自 ServiceProvider)
RemoveService(Type, Boolean)

从内部服务集合或父服务容器中删除指定的服务。

(继承自 ServiceProvider)
RollbackTransactionCore()

回滚或取消事务,并返回新的当前事务级别。

SetParameters(DbCommand, IVsDataParameter[])

从指定的参数数组IVsDataParameter向给定DbCommand命令添加新参数。

事件

MessageReceived

从数据源接收消息时发生。

(继承自 DataConnectionSupport)
SiteChanged

在网站更改时发生。

(继承自 DataSiteableServiceProvider<T>)
StateChanged

在数据连接状态更改时发生。

(继承自 DataConnectionSupport)

显式接口实现

IServiceProvider.QueryService(Guid, Guid, IntPtr)

作为通过 IServiceProvider 实现公开的服务的工厂执行。

(继承自 ServiceProvider)
IVsDataSiteableObject<IVsDataProvider>.Site

表示 IVsDataConnectionSupport 接口的实现,并使用适当的 ADO .NET 对象间接实现 IVsDataCommand、IVsDataAsyncCommand 和 IVsDataTransaction 接口。

扩展方法

QueryService(IServiceProvider, Guid)

获取由服务提供商基于其服务 GUID 公开的服务。

QueryService<TService>(IServiceProvider)

获取服务提供程序根据其服务类型公开的服务。

适用于