AdoDotNetConnectionSupport 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供 DataConnectionSupport 的托管实现, DataCommand,以及分别使用 ADO.NET IDbConnection、IDbCommand 和 IDbTransactioninterfaces 的DataTransaction类;还提供了一种提供 DataSourceVersionComparer 类实现的简单方法。
public ref class AdoDotNetConnectionSupport : Microsoft::VisualStudio::Data::DataConnectionSupport
public class AdoDotNetConnectionSupport : Microsoft.VisualStudio.Data.DataConnectionSupport
type AdoDotNetConnectionSupport = class
inherit DataConnectionSupport
Public Class AdoDotNetConnectionSupport
Inherits DataConnectionSupport
- 继承
构造函数
| 名称 | 说明 |
|---|---|
| AdoDotNetConnectionSupport(String) |
类构造函数。 使用指定的 ADO.NET 提供程序名称初始化 AdoDotNetConnectionSupport 类的实例。 |
属性
| 名称 | 说明 |
|---|---|
| BaseCommand |
检索用于在此连接上执行命令的主 IDbCommand 对象。 |
| Connection |
IDbConnection检索当前连接支持实例正在使用的对象。 |
| ConnectionString |
检索或设置建立指定数据源连接所需的信息的字符串表示形式。 |
| ConnectionTimeout |
检索或设置在终止尝试并生成超时错误之前等待建立连接的时间量(以秒为单位)。 |
| CurrentTransactionLevel |
检索当前事务级别。 |
| ExecutingCommand |
IDbCommand检索当前用于执行的实例。 |
| PreparedCommands |
检索以前准备的对象列表 IDbCommand 。 |
| ProviderObject |
检索指定连接的基础提供程序对象。 |
| ServiceTypes |
检索用于将未托管的 QueryService 方法调用(在其中指定服务 GUID)的服务类型列表,并将其转换为在其中指定托管类型的托管 IServiceProvider.GetService 方法调用。 (继承自 ServiceProvider) |
| Site |
检索或设置站点对象实例。 (继承自 ServiceProviderWithSite) |
| State |
检索数据连接的状态。 |
| Transaction |
检索当前 IDbTransaction(如果有)。 |
方法
活动
| 名称 | 说明 |
|---|---|
| SiteChanged |
属性 Site 发生更改时引发的事件。 (继承自 ServiceProviderWithSite) |
显式接口实现
| 名称 | 说明 |
|---|---|
| IObjectWithSite.GetSite(Guid, IntPtr) |
使用 IObjectWithSite.SetSite(Object) 该方法检索最后一个网站集。 如果没有已知的站点,则会引发异常。 (继承自 ServiceProviderWithSite) |
| IObjectWithSite.SetSite(Object) |
提供指向给定对象的站点 IUnknown 指针。 (继承自 ServiceProviderWithSite) |
| IServiceProvider.QueryService(Guid, Guid, IntPtr) |
作为通过 IServiceProvider 实现公开的服务的工厂。 (继承自 ServiceProvider) |
扩展方法
| 名称 | 说明 |
|---|---|
| QueryService(IServiceProvider, Guid) |
获取由服务提供商根据其服务 GUID 公开的服务。 |
| QueryService<TService>(IServiceProvider) |
获取由服务提供商根据其服务类型公开的服务。 |