Share via


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
Public method AdoDotNetConnectionProperties Initializes a new instance of the AdoDotNetConnectionProperties class.

Top

Properties

  Name Description
Protected property ConnectionStringBuilder Gets the underlying ADO.NET connection string builder object for the current connection properties instance.
Public property Count Gets the number of connection properties.
Public property IsComplete Gets a value indicating whether sufficient connection properties have been set for the connection string.
Public property IsExtensible Gets a value indicating whether the DDEX provider connection properties are extensible.
Public property Item Gets or sets a value for a specified property on the DDEX provider. Raises the PropertyChanged event if the property is set.
Public property Keys Gets all the properties that are part of the data connection string.
Public property Site Gets or sets the object site. (Inherited from DataSiteableObject<T>.)
Public property Values Gets the values of the connection string.

Top

Methods

  Name Description
Public method Add(String, Object) Adds a new property to the current connection properties collection. Raises the PropertyChanged event.
Public method Add(String, Type, Object) Adds a new property to the current connection properties collection.
Public method Contains Tests whether a specified property name and value pair is a member of the current set of connection properties.
Public method ContainsKey Tests whether the specified property name is a member of the current set of connection properties.
Public method CopyTo Copies the set of connection properties to an array, starting at the specified array index.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetSynonyms Retrieves an array list of synonyms for a specified data connection property.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IsSensitive Returns a Boolean value indicating whether a specified property contains sensitive information.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnPropertyChanged Raises the PropertyChanged event when a property changes in the data connection string.
Protected method OnSiteChanged Raises an event if the Site has changed. (Overrides DataSiteableObject<T>.OnSiteChanged(EventArgs).)
Public method 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.
Public method Remove Removes a property from the current connection property collection.
Public method Reset() Resets a connection property to its initial value and raises the PropertyChanged event.
Public method Reset(String) Removes the given property from the connection string and raises the PropertyChanged event.
Public method ToDisplayString Retrieves a string representation of the current set of data connection properties that are suitable for on-screen display.
Public method ToSafeString Returns a string representation of the current set of data connection properties, excluding the sensitive properties that should be serialized.
Public method ToString Returns a string representation of the current set of data connection properties. (Overrides Object.ToString().)
Public method 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
Public event PropertyChanged Occurs on the occurrence of a change to a connection property.
Public event SiteChanged Occurs when the Site property is changed. (Inherited from DataSiteableObject<T>.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method ICollection<KeyValuePair<String, Object>>.Add Adds a new property to the current connection properties collection. Raises the PropertyChanged event.
Explicit interface implemetationPrivate method ICollection<KeyValuePair<String, Object>>.Clear Removes all elements from the specified ICollection<T> instance.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetAttributes Retrieves a collection of custom attributes for the specified object.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetClassName Retrieves the class name of the specified object.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetComponentName Retrieves the name of the specified object.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetConverter Retrieves a type converter for the specified object.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetDefaultEvent Retrieves the default event for the specified object.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetDefaultProperty Retrieves the default property for the specified object.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetEditor Retrieves an editor of the specified type for this object.
Explicit interface implemetationPrivate method IEnumerable<KeyValuePair<String, Object>>.GetEnumerator Retrieves an enumerator that enumerates over all of the known connection properties and their values, if any.
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Retrieves an enumerator that enumerates over all of the known connection properties and their values, if any.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetEvents() For a description of this member, see GetEvents.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetEvents(array<Attribute[]) For a description of this member, see GetEvents.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetProperties() For a description of this member, see GetProperties.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetProperties(array<Attribute[]) For a description of this member, see GetProperties.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetPropertyOwner For a description of this member, see GetPropertyOwner.
Explicit interface implemetationPrivate property ICollection<KeyValuePair<String, Object>>.IsReadOnly Gets a value indicating whether the IDictionary instance is read-only.
Explicit interface implemetationPrivate method 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.

See Also

Reference

Microsoft.VisualStudio.Data.Framework.AdoDotNet Namespace