DataConnectionSupport 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供属性和方法,使你能够直接处理与数据源的连接。
public ref class DataConnectionSupport abstract : Microsoft::VisualStudio::Data::ServiceProviderWithSite, IDisposable
public abstract class DataConnectionSupport : Microsoft.VisualStudio.Data.ServiceProviderWithSite, IDisposable
type DataConnectionSupport = class
inherit ServiceProviderWithSite
interface IDisposable
Public MustInherit Class DataConnectionSupport
Inherits ServiceProviderWithSite
Implements IDisposable
- 继承
- 派生
- 实现
构造函数
| 名称 | 说明 |
|---|---|
| DataConnectionSupport() |
类构造函数。 实例化类的非 DataConnectionSupport 参数化实例。 |
属性
| 名称 | 说明 |
|---|---|
| ConnectionString |
检索或设置建立给定数据源连接所需的信息的字符串表示形式。 |
| ConnectionTimeout |
检索或设置在终止尝试并生成超时错误之前等待建立连接的时间量(以秒为单位)。 |
| ProviderObject |
检索指定连接的基础数据提供程序对象。 |
| ServiceTypes |
检索用于将未托管的 QueryService 方法调用(在其中指定服务 GUID)的服务类型列表,并将其转换为在其中指定托管类型的托管 IServiceProvider.GetService 方法调用。 (继承自 ServiceProvider) |
| Site |
检索或设置站点对象实例。 (继承自 ServiceProviderWithSite) |
| State |
检索数据连接的状态。 |
方法
| 名称 | 说明 |
|---|---|
| Close() |
关闭指定的连接。 |
| Dispose() |
执行与释放、释放或重置资源关联的任务。 |
| Dispose(Boolean) |
执行与释放、释放或重置资源关联的任务。 |
| Finalize() |
完成连接。 |
| GetService(Guid) |
检索具有指定服务 GUID 的服务。 (继承自 ServiceProvider) |
| GetService(Type) |
检索指定类型的服务。 (继承自 ServiceProvider) |
| GetServiceImpl(Guid) |
提供用于使用特定 GUID 检索服务的实现。 (继承自 ServiceProvider) |
| GetServiceImpl(Type) |
允许获取实现服务。 |
| Initialize(Object) |
从现有数据提供程序对象(可选)初始化指定的连接。 |
| OnSiteChanged(EventArgs) |
引发 SiteChanged 事件。 (继承自 ServiceProviderWithSite) |
| Open(Boolean) |
打开指定的连接。 |
| RaiseMessageReceived(String) |
MessageReceived在封闭DataConnection实例上引发事件。 |
| RaiseStateChanged(DataConnectionState, DataConnectionState) |
在封闭 DataConnection 实例上引发状态更改事件。 |
活动
| 名称 | 说明 |
|---|---|
| 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) |
获取由服务提供商根据其服务类型公开的服务。 |