使用ADO.NET连接字符串生成器基类(DbConnectionStringBuilder),使 IVsDataConnectionProperties 选件类的实现。
继承层次结构
System.Object
Microsoft.VisualStudio.Data.Framework.DataSiteableObject<IVsDataProvider>
Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetConnectionProperties
命名空间: Microsoft.VisualStudio.Data.Framework.AdoDotNet
程序集: Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)
语法
声明
Public Class AdoDotNetConnectionProperties _
Inherits DataSiteableObject(Of IVsDataProvider) _
Implements IVsDataConnectionUIProperties, IVsDataConnectionProperties, IDictionary(Of String, Object), _
ICollection(Of KeyValuePair(Of String, Object)), IEnumerable(Of KeyValuePair(Of String, Object)), _
IEnumerable, ICustomTypeDescriptor, INotifyPropertyChanged
public class AdoDotNetConnectionProperties : DataSiteableObject<IVsDataProvider>,
IVsDataConnectionUIProperties, IVsDataConnectionProperties, IDictionary<string, Object>, ICollection<KeyValuePair<string, Object>>,
IEnumerable<KeyValuePair<string, Object>>, IEnumerable, ICustomTypeDescriptor,
INotifyPropertyChanged
public ref class AdoDotNetConnectionProperties : public DataSiteableObject<IVsDataProvider^>,
IVsDataConnectionUIProperties, IVsDataConnectionProperties, IDictionary<String^, Object^>,
ICollection<KeyValuePair<String^, Object^>>, IEnumerable<KeyValuePair<String^, Object^>>,
IEnumerable, ICustomTypeDescriptor, INotifyPropertyChanged
type AdoDotNetConnectionProperties =
class
inherit DataSiteableObject<IVsDataProvider>
interface IVsDataConnectionUIProperties
interface IVsDataConnectionProperties
interface IDictionary<string, Object>
interface ICollection<KeyValuePair<string, Object>>
interface IEnumerable<KeyValuePair<string, Object>>
interface IEnumerable
interface ICustomTypeDescriptor
interface INotifyPropertyChanged
end
public class AdoDotNetConnectionProperties extends DataSiteableObject<IVsDataProvider> implements IVsDataConnectionUIProperties, IVsDataConnectionProperties, IDictionary<String, Object>, ICollection<KeyValuePair<String, Object>>, IEnumerable<KeyValuePair<String, Object>>, IEnumerable, ICustomTypeDescriptor, INotifyPropertyChanged
AdoDotNetConnectionProperties 类型公开以下成员。
构造函数
名称 | 说明 | |
---|---|---|
![]() |
AdoDotNetConnectionProperties | 初始化 AdoDotNetConnectionProperties 类的新实例。 |
页首
属性
名称 | 说明 | |
---|---|---|
![]() |
ConnectionStringBuilder | 获取当前连接属性实例的基础 ADO.NET 连接字符串生成器对象。 |
![]() |
Count | 获取连接属性数。 |
![]() |
IsComplete | 获取指示足够的连接属性是否的值对于连接字符串设置。 |
![]() |
IsExtensible | 获取一DDEX提供程序连接属性是否的值是可扩展的。 |
![]() |
Item | 获取或设置一个指定属性的值在DDEX提供程序。如果将属性设置为,PropertyChanged 引发事件。 |
![]() |
Keys | 获取表示数据连接字符串的一部分的所有属性。 |
![]() |
Site | 获取或设置对象站点。 (继承自 DataSiteableObject<T>。) |
![]() |
Values | 获取连接字符串的值。 |
页首
方法
名称 | 说明 | |
---|---|---|
![]() |
Add(String, Object) | 添加新的属性绑定到当前连接属性集合。引发 PropertyChanged 事件。 |
![]() |
Add(String, Type, Object) | 添加新的属性绑定到当前连接属性集合。 |
![]() |
Contains | 测试一个指定的属性名称和值是否对都是当前的成员设置连接属性。 |
![]() |
ContainsKey | 测试指定的属性名称是否为当前的成员设置连接属性。 |
![]() |
CopyTo | 复制设置连接属性设置为数组,开始在指定的数组索引。 |
![]() |
Equals | 确定指定的对象是否等于当前对象。 (继承自 Object。) |
![]() |
Finalize | 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。) |
![]() |
GetHashCode | 用作特定类型的哈希函数。 (继承自 Object。) |
![]() |
GetSynonyms | 检索数组表一个指定的数据连接属性的同义词。 |
![]() |
GetType | 获取当前实例的 Type。 (继承自 Object。) |
![]() |
IsSensitive | 返回值指示指定属性是否的 Boolean 值包含敏感信息。 |
![]() |
MemberwiseClone | 创建当前 Object 的浅表副本。 (继承自 Object。) |
![]() |
OnPropertyChanged | 当属性在数据连接字符串时,将引发 PropertyChanged 事件。 |
![]() |
OnSiteChanged | 如果站点已更改,引发事件。 (重写 DataSiteableObject<T>.OnSiteChanged(EventArgs)。) |
![]() |
Parse | 在当前 AdoDotNetConnectionProperties 选件类实例反汇编连接字符串的元素设置连接属性设置为。引发 PropertyChanged 事件。 |
![]() |
Remove | 从当前连接属性集合中移除属性。 |
![]() |
Reset() | 重置一个属性连接到其原始值并引发 PropertyChanged 事件。 |
![]() |
Reset(String) | 从连接字符串中移除该特定属性并引发 PropertyChanged 事件。 |
![]() |
ToDisplayString | 检索当前的字符串表示形式设置数据应用于屏幕上显示的连接属性。 |
![]() |
ToSafeString | 返回当前的字符串表示形式设置数据连接属性,包括序列化的敏感属性。 |
![]() |
ToString | 返回当前的字符串表示形式设置数据连接属性。 (重写 Object.ToString()。) |
![]() |
TryGetValue | 检索值与所提供的密钥对应通过对.NET Framework连接字符串生成器基类(DbConnectionStringBuilder)的方法。 |
页首
事件
名称 | 说明 | |
---|---|---|
![]() |
PropertyChanged | 在发生的更改发生了连接属性的。 |
![]() |
SiteChanged | 当 Site 属性更改时发生。 (继承自 DataSiteableObject<T>。) |
页首
显式接口实现
页首
备注
不应基于ADO.NET的DDEX提供程序需要自定义对象枚举。但是,此选件类是在方案中扩展添加或需要在Visual Studio内已修改的枚举功能的基类。
大多数本选件类的公共方法从基类(IVsDataConnectionProperties)被重写,因为此实现不依赖于任何帮助的基类与分析和编译的任务;相反,它们在连接字符串生成器对象通常委托给等效调用。
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。