Share via


DataExplorerConnectionManager Class

Provides methods and properties that enable programmatic interaction with data connections exposed in the Server Explorer.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.DataExplorerConnectionManager

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

Syntax

'Declaration
<GuidAttribute("D8D207DA-64EB-4b46-9740-282F5F458B22")> _
Public MustInherit Class DataExplorerConnectionManager _
    Implements ICollection, IEnumerable
[GuidAttribute("D8D207DA-64EB-4b46-9740-282F5F458B22")]
public abstract class DataExplorerConnectionManager : ICollection, 
    IEnumerable
[GuidAttribute(L"D8D207DA-64EB-4b46-9740-282F5F458B22")]
public ref class DataExplorerConnectionManager abstract : ICollection, 
    IEnumerable
[<AbstractClass>]
[<GuidAttribute("D8D207DA-64EB-4b46-9740-282F5F458B22")>]
type DataExplorerConnectionManager =  
    class 
        interface ICollection 
        interface IEnumerable 
    end
public abstract class DataExplorerConnectionManager implements ICollection, IEnumerable

The DataExplorerConnectionManager type exposes the following members.

Constructors

  Name Description
Protected method DataExplorerConnectionManager Class constructor. This member supports the DDEX infrastructure and is not intended to be used directly from your code.

Top

Properties

  Name Description
Public property Count Retrieves an integer value specifying the number of current data connections visible in the Server Explorer.

Top

Methods

  Name Description
Public method AddConnection Adds a new connection to the Server Explorer window with the specified connection settings.
Public method CopyTo Copies all DataExplorerConnection object instances into an array, starting at a specified 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 FindConnection(String) Locates a DataExplorerConnection object instance with a specified display name.
Public method FindConnection(Guid, String, Boolean) Locates a DataExplorerConnection object instance with specified connection settings.
Public method GetConnections Retrieves an array containing all the current DataExplorerConnection instances.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method PromptAndAddConnection Prompts the user for, and adds, a new DataExplorerConnection object instance.
Public method RemoveConnection Removes an existing DataExplorerConnection object instance from the set of current connections.
Public method SelectConnection Selects a specific data connection in the Server Explorer tree view.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method ICollection.CopyTo Copies the set of connections exposed in the Visual Studio Server Explorer to an array, starting at the specified array index.
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Retrieves an enumerator that is able to iterate through the connections collection.
Explicit interface implemetationPrivate property ICollection.IsSynchronized Retrieves a value that indicates whether access to the connections collection is synchronized (thread safe).
Explicit interface implemetationPrivate property ICollection.SyncRoot Retrieves an object that can be used to synchronize access to the connections collection.

Top

Remarks

Depending on the Visual Studio version being used, the tool window that contains data connections may be called Server Explorer, Database Explorer, or Data Explorer. Regardless of the term used, however, the DataExplorerConnectionManager class allows you to manage all connection nodes that appear as children beneath the Data Connections node in Visual Studio.

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 Namespace

DataExplorerConnection

ICollection

IEnumerable