AdoDotNetConnectionProperties 类

使用 ADO.NET 连接字符串生成器基类 (DbConnectionStringBuilder) 提供,IVsDataConnectionProperties 类的实现。

继承层次结构

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 IVsDataConnectionProperties, IDictionary(Of String, Object),  _
    ICollection(Of KeyValuePair(Of String, Object)), IEnumerable(Of KeyValuePair(Of String, Object)),  _
    IEnumerable, IVsDataConnectionUIProperties, ICustomTypeDescriptor, INotifyPropertyChanged
public class AdoDotNetConnectionProperties : DataSiteableObject<IVsDataProvider>, 
    IVsDataConnectionProperties, IDictionary<string, Object>, ICollection<KeyValuePair<string, Object>>, 
    IEnumerable<KeyValuePair<string, Object>>, IEnumerable, IVsDataConnectionUIProperties, 
    ICustomTypeDescriptor, INotifyPropertyChanged
public ref class AdoDotNetConnectionProperties : public DataSiteableObject<IVsDataProvider^>, 
    IVsDataConnectionProperties, IDictionary<String^, Object^>, ICollection<KeyValuePair<String^, Object^>>, 
    IEnumerable<KeyValuePair<String^, Object^>>, IEnumerable, 
    IVsDataConnectionUIProperties, ICustomTypeDescriptor, INotifyPropertyChanged
type AdoDotNetConnectionProperties =  
    class 
        inherit DataSiteableObject<IVsDataProvider>
        interface IVsDataConnectionProperties 
        interface IDictionary<string, Object>
        interface ICollection<KeyValuePair<string, Object>>
        interface IEnumerable<KeyValuePair<string, Object>>
        interface IEnumerable 
        interface IVsDataConnectionUIProperties 
        interface ICustomTypeDescriptor 
        interface INotifyPropertyChanged 
    end
public class AdoDotNetConnectionProperties extends DataSiteableObject<IVsDataProvider> implements IVsDataConnectionProperties, IDictionary<String, Object>, ICollection<KeyValuePair<String, Object>>, IEnumerable<KeyValuePair<String, Object>>, IEnumerable, IVsDataConnectionUIProperties, 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>。)

页首

显式接口实现

  名称 说明
显式接口实现私有方法 ICollection<KeyValuePair<String, Object>>.Add 添加新的属性到当前连接属性集合。引发 PropertyChanged 事件。
显式接口实现私有方法 ICollection<KeyValuePair<String, Object>>.Clear 从指定的 ICollection 实例中移除所有元素。
显式接口实现私有方法 ICustomTypeDescriptor.GetAttributes 检索自定义特性的集合指定的对象。
显式接口实现私有方法 ICustomTypeDescriptor.GetClassName 检索指定对象的类名。
显式接口实现私有方法 ICustomTypeDescriptor.GetComponentName 检索指定对象的名称。
显式接口实现私有方法 ICustomTypeDescriptor.GetConverter 检索指定对象的类型转换器。
显式接口实现私有方法 ICustomTypeDescriptor.GetDefaultEvent 检索指定对象的默认事件。
显式接口实现私有方法 ICustomTypeDescriptor.GetDefaultProperty 检索指定对象的默认属性。
显式接口实现私有方法 ICustomTypeDescriptor.GetEditor 检索指定类型的编辑器此对象。
显式接口实现私有方法 IEnumerable<KeyValuePair<String, Object>>.GetEnumerator 检索枚举所有已知的连接属性及其值,因此,如果任何一个的枚举器。
显式接口实现私有方法 IEnumerable.GetEnumerator 检索枚举所有已知的连接属性及其值,因此,如果任何一个的枚举器。
显式接口实现私有方法 ICustomTypeDescriptor.GetEvents() 有关此成员的说明,请参见 GetEvents
显式接口实现私有方法 ICustomTypeDescriptor.GetEvents(array<Attribute[]) 有关此成员的说明,请参见 GetEvents
显式接口实现私有方法 ICustomTypeDescriptor.GetProperties() 有关此成员的说明,请参见 GetProperties
显式接口实现私有方法 ICustomTypeDescriptor.GetProperties(array<Attribute[]) 有关此成员的说明,请参见 GetProperties
显式接口实现私有方法 ICustomTypeDescriptor.GetPropertyOwner 有关此成员的说明,请参见 GetPropertyOwner
显式接口实现私有属性 ICollection<KeyValuePair<String, Object>>.IsReadOnly 获取一个值,该值指示 IDictionary 实例是否为只读。
显式接口实现私有方法 ICollection<KeyValuePair<String, Object>>.Remove 测试的指定属性名和值对是否的当前成员设置附加属性。

页首

备注

不应基于 ADO.NET 的 DDEX 提供程序需要自定义对象枚举。 但是,此类是在方案可以扩展或将需要在 Visual Studio 中修改枚举功能的基类。

大多数此类的公共方法从基类 (IVsDataConnectionProperties) 重写,因为此实现不依赖于任何帮助的基类与分析和生成的任务;相反,它们通常委托对连接字符串生成器对象的项的调用。

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.VisualStudio.Data.Framework.AdoDotNet 命名空间