Delen via


AdoDotNetConnectionProperties Class

Provides an implementation of the DataConnectionProperties class using the ADO.NET connection string builder base class (DbConnectionStringBuilder).

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.DataConnectionProperties
    Microsoft.VisualStudio.Data.AdoDotNet.AdoDotNetConnectionProperties

Namespace:  Microsoft.VisualStudio.Data.AdoDotNet
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'Declaration
Public Class AdoDotNetConnectionProperties _
    Inherits DataConnectionProperties _
    Implements ICustomTypeDescriptor, IDictionary, ICollection, IEnumerable
public class AdoDotNetConnectionProperties : DataConnectionProperties, 
    ICustomTypeDescriptor, IDictionary, ICollection, IEnumerable
public ref class AdoDotNetConnectionProperties : public DataConnectionProperties, 
    ICustomTypeDescriptor, IDictionary, ICollection, IEnumerable
type AdoDotNetConnectionProperties =  
    class 
        inherit DataConnectionProperties 
        interface ICustomTypeDescriptor 
        interface IDictionary 
        interface ICollection 
        interface IEnumerable 
    end
public class AdoDotNetConnectionProperties extends DataConnectionProperties implements ICustomTypeDescriptor, IDictionary, ICollection, IEnumerable

The AdoDotNetConnectionProperties type exposes the following members.

Constructors

  Name Description
Public method AdoDotNetConnectionProperties(String) Class constructor. Instantiates a parameterized instance of the AdoDotNetConnectionProperties class that provides the ADO.NET provider name.
Public method AdoDotNetConnectionProperties(String, String) Parameterized class constructor. Instantiates a parameterized instance of the AdoDotNetConnectionProperties class that provides the ADO.NET provider invariant name and a provider connection string.

Top

Properties

  Name Description
Public property ConnectionStringBuilder Retrieves the underlying ADO.NET connection string builder object for the current connection properties instance.
Public property IsComplete Retrieves a Boolean value indicating whether a given connection string is complete. (Overrides DataConnectionProperties.IsComplete.)
Public property IsExtensible Retrieves or sets a Boolean value indicating whether the DDEX Provider connection properties are extensible. (Overrides DataConnectionProperties.IsExtensible.)
Public property Item Retrieves or sets a value for a specified property on the DDEX Provider. (Overrides DataConnectionProperties.Item.)
Protected property OrderedProperties Retrieves a collection of property names specifying a reasonable (or necessary) order for the properties when represented in string form. (Inherited from DataConnectionProperties.)

Top

Methods

  Name Description
Public method Add Adds a new property to the current connection properties collection. (Overrides DataConnectionProperties.Add(String).)
Protected method AddProperty(PropertyDescriptor, array<Attribute[]) Dynamically adds a new property to the collection of properties natively recognized by the current instance of the DataConnectionProperties class. (Inherited from DataConnectionProperties.)
Protected method AddProperty(String, Type, array<Attribute[]) Dynamically adds a new property to the collection of properties natively recognized by this data connection properties instance. (Inherited from DataConnectionProperties.)
Public method Contains Tests whether a specified property is a member of the current set of connection properties. (Overrides DataConnectionProperties.Contains(String).)
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method EquivalentTo Tests whether the current instance of the class is equivalent to another class instance. (Overrides DataConnectionProperties.EquivalentTo(DataConnectionProperties).)
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 GetBasicProperties Retrieves an array of property name values representing the set of "basic" properties recognizable by the current AdoDotNetConnectionProperties class instance. (Overrides DataConnectionProperties.GetBasicProperties().)
Public method GetEnumerator Retrieves an enumerator that enumerates over all of the known connection properties and their values, if any. (Overrides DataConnectionProperties.GetEnumerator().)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Protected method GetNameAsString Formats a property name for placement in a connection string. (Inherited from DataConnectionProperties.)
Protected method GetProperties() Retrieves the collection of descriptors of all currently known properties. (Inherited from DataConnectionProperties.)
Protected method GetProperties(array<Attribute[]) Retrieves the collection of descriptors of currently known properties that match a specified set of attributes. (Inherited from DataConnectionProperties.)
Protected method GetProperty Retrieves the descriptor of a property with the specified property name. (Inherited from DataConnectionProperties.)
Public method GetSynonyms Retrieves an array list of synonyms for a specified data connection property. (Overrides DataConnectionProperties.GetSynonyms(String).)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method GetValueAsString Formats a property value for placement in a connection string. (Inherited from DataConnectionProperties.)
Protected method Initialize Initializes the current DataConnectionProperties instance to its default state, then sets each property in the specified dictionary. (Inherited from DataConnectionProperties.)
Protected method InitializeProperties Initializes the set of natively recognized properties for the current DataConnectionProperties instance. (Inherited from DataConnectionProperties.)
Protected method InitializeSynonyms Initializes the set of synonyms available for each natively recognized property in the current DataConnectionProperties instance. (Inherited from DataConnectionProperties.)
Protected method InitializeValue Initializes the value of a specified connection property. (Inherited from DataConnectionProperties.)
Protected method InitializeValues Initializes values for a specified set of properties using a dictionary of name/value pairs. (Inherited from DataConnectionProperties.)
Public method IsSensitive Returns a Boolean value indicating whether a specified property contains sensitive information. (Overrides DataConnectionProperties.IsSensitive(String).)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method ModifyProperty Modifies an existing property of which the current DataConnectionProperties instance is natively aware. (Inherited from DataConnectionProperties.)
Protected method OnPropertyChanged Raises the PropertyChanged event. (Inherited from DataConnectionProperties.)
Public method Parse Disassembles the components of a connection string into a set of connection properties as set in the current AdoDotNetConnectionProperties class instance. (Overrides DataConnectionProperties.Parse(String).)
Protected method ReadNameFromString Reads a property name from a connection string starting at a specified index, then updates the index to point to a position immediately following the property name. (Inherited from DataConnectionProperties.)
Protected method ReadValueFromString Reads a property value from a connection string starting at a specified index, converts it to the correct type, and updates the index to point to a position following the property name. (Inherited from DataConnectionProperties.)
Public method Remove Removes a property from the current connection property collection. (Overrides DataConnectionProperties.Remove(String).)
Protected method RemoveProperty Removes a natively recognized property. (Inherited from DataConnectionProperties.)
Public method Reset() Resets a connection property to its initial value. (Overrides DataConnectionProperties.Reset().)
Public method Reset(String) Reverts a property value to its initial value. (Overrides DataConnectionProperties.Reset(String).)
Protected method ResolveSynonym Attempts to resolves a synonym for the PropertyDescriptor associated with a base property by returning the base property descriptor. (Inherited from DataConnectionProperties.)
Protected method SetSynonyms Sets a list of strings as synonyms of a specified base property name. (Inherited from DataConnectionProperties.)
Protected method ShouldPersistProperty Indicates whether a property should be persisted when building a connection string. (Inherited from DataConnectionProperties.)
Public method Test Tests that the current set of connection properties will successfully open a connection. (Overrides DataConnectionProperties.Test().)
Public method ToDisplayString Retrieves a string representation of the current set of data connection properties that are suitable for on-screen display. (Overrides DataConnectionProperties.ToDisplayString().)
Public method ToFullString Retrieves a string representation of the current set of data connection properties for this instance. (Overrides DataConnectionProperties.ToFullString().)
Public method ToString Retrieves a full string representation of the current connection properties. (Inherited from DataConnectionProperties.)
Protected method ToTestString Retrieves a form of the connection string that can be used for testing the connection.

Top

Events

  Name Description
Public event PropertyChanged Event that fires on the occurrence of a change to a connection property. (Inherited from DataConnectionProperties.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IDictionary.Add Adds an element as a key/value pair to the specified IDictionaryinstance.
Explicit interface implemetationPrivate method IDictionary.Clear Removes all elements from the specified IDictionary instance.
Explicit interface implemetationPrivate method IDictionary.Contains Determines whether the current IDictionaryinstance contains an element with the specified key.
Explicit interface implemetationPrivate method ICollection.CopyTo Copies the set of connection properties to an array, starting at the specified array index.
Explicit interface implemetationPrivate property ICollection.Count Retrieves the number of elements contained in the current ICollectioninstance.
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 IDictionary.GetEnumerator Returns an IDictionaryEnumerator object for the IDictionary instance.
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Retrieves an enumerator that is able to iterate through the connection properties collection.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetEvents() Retrieves the events for the specified instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetEvents(array<Attribute[]) Retrieves the events for this instance of a component using the specified attribute array as a filter.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetProperties() Retrieves the properties for the specified instance of a component.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetProperties(array<Attribute[]) Retrieves the properties for the specified instance of a component using the attribute array as a filter.
Explicit interface implemetationPrivate method ICustomTypeDescriptor.GetPropertyOwner Retrieves an object that contains the property described by the specified property descriptor.
Explicit interface implemetationPrivate property IDictionary.IsFixedSize Retrieves a Boolean value indicating whether the specified IDictionaryinstance has a fixed size.
Explicit interface implemetationPrivate property IDictionary.IsReadOnly Retrieves a Boolean indicating whether the IDictionaryinstance is read-only.
Explicit interface implemetationPrivate property ICollection.IsSynchronized Retrieves a value that indicates whether access to the connection properties collection is synchronized (thread safe).
Explicit interface implemetationPrivate property IDictionary.Item Retrieves an item, or element, with the specified key from the current IDictionaryinstance.
Explicit interface implemetationPrivate property IDictionary.Keys Retrieves an ICollection object containing the keys for the IDictionary instance.
Explicit interface implemetationPrivate method IDictionary.Remove Removes the element with the specified key from the IDictionary instance.
Explicit interface implemetationPrivate property ICollection.SyncRoot Retrieves an object that can be used to synchronize access to the connection properties collection.
Explicit interface implemetationPrivate property IDictionary.Values Retrieves an ICollection object containing the values in the specified IDictionary instance.
Explicit interface implemetationPrivate event IDataConnectionProperties.PropertyChanged Event that fires on the occurrence of a change to a connection property. (Inherited from DataConnectionProperties.)

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 (DataConnectionProperties class) 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.AdoDotNet Namespace

DataConnectionProperties

DbConnectionStringBuilder

EnumerateObjects