DataConnectionProperties Class
Provides support for the parsing and formatting of connection strings containing data connection properties, as well as for strongly typed property storage, custom attributes, and synonyms.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Data.Framework.DataConnectionProperties
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaration
Public MustInherit Class DataConnectionProperties _
Implements IVsDataConnectionUIProperties, IVsDataConnectionProperties, IDictionary(Of String, Object), _
ICollection(Of KeyValuePair(Of String, Object)), IEnumerable(Of KeyValuePair(Of String, Object)), _
IEnumerable, ICustomTypeDescriptor, INotifyPropertyChanged
public abstract class DataConnectionProperties : IVsDataConnectionUIProperties,
IVsDataConnectionProperties, IDictionary<string, Object>, ICollection<KeyValuePair<string, Object>>,
IEnumerable<KeyValuePair<string, Object>>, IEnumerable, ICustomTypeDescriptor,
INotifyPropertyChanged
public ref class DataConnectionProperties abstract : IVsDataConnectionUIProperties,
IVsDataConnectionProperties, IDictionary<String^, Object^>, ICollection<KeyValuePair<String^, Object^>>,
IEnumerable<KeyValuePair<String^, Object^>>, IEnumerable,
ICustomTypeDescriptor, INotifyPropertyChanged
[<AbstractClass>]
type DataConnectionProperties =
class
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 abstract class DataConnectionProperties implements IVsDataConnectionUIProperties, IVsDataConnectionProperties, IDictionary<String, Object>, ICollection<KeyValuePair<String, Object>>, IEnumerable<KeyValuePair<String, Object>>, IEnumerable, ICustomTypeDescriptor, INotifyPropertyChanged
The DataConnectionProperties type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DataConnectionProperties() | Initializes a non-parameterized instance of the DataConnectionProperties class. | |
DataConnectionProperties(IEqualityComparer<String>) | Initializes a parameterized instance of the DataConnectionProperties class that provides the ability to compare property names. | |
DataConnectionProperties(IEqualityComparer<String>, Char, Char) | Initializes a parameterized instance of the DataConnectionProperties class that provides the ability to compare property names. |
Top
Properties
Name | Description | |
---|---|---|
Count | Gets the number of existing data connection properties. | |
IsComplete | Gets a Boolean value indicating whether a given connection string is complete. | |
IsExtensible | Gets or sets a Boolean value indicating whether the DDEX provider connection properties are extensible. | |
Item | Gets or sets a value for a specified property of the DDEX provider. | |
Keys | Gets a collection of the current property key names. | |
OrderedProperties | Gets a collection of property names specifying a reasonable (or necessary) order for the properties when represented in string form. | |
Values | Retrieves a collection of the current property values. |
Top
Methods
Name | Description | |
---|---|---|
Add(String, Object) | Adds a new property to the current connection properties collection. | |
Add(String, Type, Object) | Adds a new property to the current connection properties collection. | |
AddProperty(PropertyDescriptor, array<Attribute[]) | Dynamically adds a new property to the collection of properties natively recognized by the current instance of the DataConnectionProperties class. | |
AddProperty(String, Type, array<Attribute[]) | Dynamically adds a new property to the collection of properties natively recognized by this data connection properties instance. | |
Contains | Tests whether a specified property and its values are present in the current set of connection properties. | |
ContainsKey | Tests whether a specified property is a member of the current set of connection properties. | |
CopyTo | Copies the current set of connection properties and their values to the specified 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.) | |
GetKeyAsString | Formats a property key for placement in a connection string. | |
GetProperties() | Retrieves the collection of descriptors of all currently known properties. | |
GetProperties(array<Attribute[]) | Retrieves the collection of descriptors of currently known properties that match a specified set of attributes. | |
GetProperty | Retrieves the descriptor of a property with the specified property name. | |
GetSynonyms | Retrieves an array list of synonyms for a specified property. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetValueAsString | Formats a property value for placement in a connection string. | |
Initialize | Initializes the current DataConnectionProperties instance to its default state, and then sets each property in the specified dictionary. | |
InitializeProperties | Initializes the set of natively recognized properties for the current DataConnectionProperties instance. | |
InitializeSynonyms | Initializes the set of synonyms available for each natively recognized property in the current DataConnectionProperties instance. | |
InitializeValue | Initializes the value of a specified connection property. | |
InitializeValues | Initializes values for a specified set of properties, using a dictionary of name/value pairs. | |
IsSensitive | Indicates whether a property contains sensitive information. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ModifyProperty | Modifies an existing property of which the current DataConnectionProperties instance is natively aware. | |
OnPropertyChanged | Raises the PropertyChanged event. | |
Parse | Disassembles the components of a connection string into a set of properties in the current DataConnectionProperties instance. | |
ReadKeyFromString | Reads a property key name from a connection string starting at a specified index, and then updates the index to point to a position immediately following the property key name. | |
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. | |
Remove | Removes a property from the current connection property collection. | |
RemoveProperty | Removes a natively recognized property from the current collection of properties. | |
Reset() | Resets the values of connection properties to an initial state. | |
Reset(String) | Removes the specified property from the current set of data connection properties. | |
ResolveProperty | Looks up the specified property in the list of synonyms and optionally makes this property the primary name for the synonyms collection, if it is not already so. | |
SetPropertySynonyms | Sets or clears the synonyms for the specified property. | |
ShouldPersistProperty | Indicates whether a property should be persisted when building a connection string. | |
ToDisplayString | Retrieves a string representation of the current set of data connection properties that are suitable for on-screen display. | |
ToSafeString | Retrieves a string representation of the current set of data connection properties that excludes sensitive properties or properties that should not be persisted. | |
ToString | Retrieves the default string representation of the current connection properties. (Overrides Object.ToString().) | |
TryGetValue | Retrieves the value of the specified property. |
Top
Events
Name | Description | |
---|---|---|
PropertyChanged | Occurs on the occurrence of a change to a connection property. |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
ICollection<KeyValuePair<String, Object>>.Add | Adds an element as a key/value pair to the current set of connection properties. | |
ICollection<KeyValuePair<String, Object>>.Clear | Removes all elements from the current set of connection properties. | |
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 IEnumerator<T> for the KeyValuePair<String, Object>. | |
IEnumerable.GetEnumerator | Retrieves an IEnumerator. | |
ICustomTypeDescriptor.GetEvents() | Retrieves the events for the specified instance of a component. | |
ICustomTypeDescriptor.GetEvents(array<Attribute[]) | Retrieves the events for this instance of a component, using the specified attribute array as a filter. | |
ICustomTypeDescriptor.GetProperties() | Retrieves the properties for the specified instance of a component. | |
ICustomTypeDescriptor.GetProperties(array<Attribute[]) | Retrieves the properties for the specified instance of a component, using the attribute array as a filter. | |
ICustomTypeDescriptor.GetPropertyOwner | Retrieves an object that contains the property described by the specified property descriptor. | |
ICollection<KeyValuePair<String, Object>>.IsReadOnly | Gets a Boolean value indicating whether the current ICollection<T> instance is read-only. | |
ICollection<KeyValuePair<String, Object>>.Remove | Removes the specified property from the current set of connection properties. |
Top
Remarks
In the simplest case, a derived class should add properties to its class and place component attributes on these properties to customize their behavior. In the more advanced case, a derived class can override the parsing and formatting code, and dynamically change any of the properties based on specific actions, such as setting the value of a property.
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.