AdoDotNetConnectionProperties Class
Provides an implementation of the IVsDataConnectionProperties class using the ADO.NET connection string builder base class (DbConnectionStringBuilder).
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Data.Framework.DataSiteableObject<IVsDataProvider>
Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetConnectionProperties
Namespace: Microsoft.VisualStudio.Data.Framework.AdoDotNet
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaration
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
The AdoDotNetConnectionProperties type exposes the following members.
Constructors
Name | Description | |
---|---|---|
AdoDotNetConnectionProperties | Initializes a new instance of the AdoDotNetConnectionProperties class. |
Top
Properties
Name | Description | |
---|---|---|
ConnectionStringBuilder | Gets the underlying ADO.NET connection string builder object for the current connection properties instance. | |
Count | Gets the number of connection properties. | |
IsComplete | Gets a value indicating whether sufficient connection properties have been set for the connection string. | |
IsExtensible | Gets a value indicating whether the DDEX provider connection properties are extensible. | |
Item | Gets or sets a value for a specified property on the DDEX provider. Raises the PropertyChanged() event if the property is set. | |
Keys | Gets all the properties that are part of the data connection string. | |
Site | Gets or sets the object site. (Inherited from DataSiteableObject<T>.) | |
Values | Gets the values of the connection string. |
Top
Methods
Name | Description | |
---|---|---|
Add(String, Object) | Adds a new property to the current connection properties collection. Raises the PropertyChanged() event. | |
Add(String, Type, Object) | Adds a new property to the current connection properties collection. | |
Contains | Tests whether a specified property name and value pair is a member of the current set of connection properties. | |
ContainsKey | Tests whether the specified property name is a member of the current set of connection properties. | |
CopyTo | Copies the set of connection properties to an array, starting at the specified array index. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetSynonyms | Retrieves an array list of synonyms for a specified data connection property. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsSensitive | Returns a Boolean value indicating whether a specified property contains sensitive information. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnPropertyChanged | Raises the PropertyChanged event when a property changes in the data connection string. | |
OnSiteChanged | Raises an event if the Site has changed. (Overrides DataSiteableObject<T>.OnSiteChanged(EventArgs).) | |
Parse | Disassembles the components of a connection string into a set of connection properties as set in the current AdoDotNetConnectionProperties class instance. Raises the PropertyChanged() event. | |
Remove | Removes a property from the current connection property collection. | |
Reset() | Resets a connection property to its initial value and raises the PropertyChanged() event. | |
Reset(String) | Removes the given property from the connection string and raises the PropertyChanged() event. | |
ToDisplayString | Retrieves a string representation of the current set of data connection properties that are suitable for on-screen display. | |
ToSafeString | Returns a string representation of the current set of data connection properties, excluding the sensitive properties that should be serialized. | |
ToString | Returns a string representation of the current set of data connection properties. (Overrides Object.ToString().) | |
TryGetValue | Retrieves a value corresponding to the supplied key by calling this method on the .NET Framework connection string builder base class (DbConnectionStringBuilder). |
Top
Events
Name | Description | |
---|---|---|
PropertyChanged | Occurs on the occurrence of a change to a connection property. | |
SiteChanged | Occurs when the Site property is changed. (Inherited from DataSiteableObject<T>.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
ICollection<KeyValuePair<String, Object>>.Add | Adds a new property to the current connection properties collection. Raises the PropertyChanged() event. | |
ICollection<KeyValuePair<String, Object>>.Clear | Removes all elements from the specified ICollection<T> instance. | |
ICustomTypeDescriptor.GetAttributes | Retrieves a collection of custom attributes for the specified object. | |
ICustomTypeDescriptor.GetClassName | Retrieves the class name of the specified object. | |
ICustomTypeDescriptor.GetComponentName | Retrieves the name of the specified object. | |
ICustomTypeDescriptor.GetConverter | Retrieves a type converter for the specified object. | |
ICustomTypeDescriptor.GetDefaultEvent | Retrieves the default event for the specified object. | |
ICustomTypeDescriptor.GetDefaultProperty | Retrieves the default property for the specified object. | |
ICustomTypeDescriptor.GetEditor | Retrieves an editor of the specified type for this object. | |
IEnumerable<KeyValuePair<String, Object>>.GetEnumerator | Retrieves an enumerator that enumerates over all of the known connection properties and their values, if any. | |
IEnumerable.GetEnumerator | Retrieves an enumerator that enumerates over all of the known connection properties and their values, if any. | |
ICustomTypeDescriptor.GetEvents() | For a description of this member, see GetEvents. | |
ICustomTypeDescriptor.GetEvents(array<Attribute[]) | For a description of this member, see GetEvents. | |
ICustomTypeDescriptor.GetProperties() | For a description of this member, see GetProperties. | |
ICustomTypeDescriptor.GetProperties(array<Attribute[]) | For a description of this member, see GetProperties. | |
ICustomTypeDescriptor.GetPropertyOwner | For a description of this member, see GetPropertyOwner. | |
ICollection<KeyValuePair<String, Object>>.IsReadOnly | Gets a value indicating whether the IDictionary instance is read-only. | |
ICollection<KeyValuePair<String, Object>>.Remove | Tests whether a specified property name and value pair is a member of the current set of connection properties. |
Top
Remarks
It is not expected that a DDEX provider based on ADO.NET will need to customize object enumeration. However, this class is a base class that you can extend in scenarios where added or modified enumeration functionality inside Visual Studio is required.
Most of the public methods on this class are overridden from the base class (IVsDataConnectionProperties) because this implementation does not rely on any of the base class for help with tasks like parsing and building; rather, they typically delegate to the equivalent call on the connection string builder object.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.