Share via


DataConnectionSupport Class

Provides properties and methods that enable you to work directly with connections to a data source.

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

Syntax

'Declaration
Public MustInherit Class DataConnectionSupport _
    Inherits DataSiteableServiceProvider(Of IVsDataConnection) _
    Implements IVsDataConnectionSupport, IServiceProvider, IDisposable, IVsDataConnectionEvents
'Usage
Dim instance As DataConnectionSupport
public abstract class DataConnectionSupport : DataSiteableServiceProvider<IVsDataConnection>, 
    IVsDataConnectionSupport, IServiceProvider, IDisposable, IVsDataConnectionEvents
public ref class DataConnectionSupport abstract : public DataSiteableServiceProvider<IVsDataConnection^>, 
    IVsDataConnectionSupport, IServiceProvider, IDisposable, IVsDataConnectionEvents
public abstract class DataConnectionSupport extends DataSiteableServiceProvider<IVsDataConnection> implements IVsDataConnectionSupport, IServiceProvider, IDisposable, IVsDataConnectionEvents

Remarks

The DataConnectionSupport class represents the data provider implementation to support a data connection.

The properties and methods of this class provide basic functionality that allows the data provider to communicate with the data source, performing such tasks as opening and closing connections and retrieving connection state. A data provider can also expose specialized services by overriding the CreateService method. The current connection-related services can be summarized as follows:

  • IVsDataObjectSupport: Provides a method for retrieving XML that describes types of data objects supported by the data source and actions that can be performed on them.

  • IVsDataObjectIdentifierResolver: Provides a method for resolving data object identifiers.

  • IVsDataObjectIdentifierConverter: Provides methods for converting between string and array representations of data object identifiers.

  • IVsDataObjectMemberComparer: Provides methods for comparing data object identifier parts and property values.

  • IVsDataCommand: Provides the ability to derive and execute various types of commands.

  • IVsDataAsyncCommand: Enables executing data commands in an asynchronous manner.

  • IVsDataTransaction: Provides the ability to begin, commit, and roll back transactions.

  • IVsDataSourceVersionComparer: Provides a method for comparing two data source–specific version strings.

  • IVsDataSourceInformation: Provides a set of well-defined name/value pairs that describe the data source.

  • IVsDataMappedObjectConverter: Enables providing a customized mapper of data source–specific metadata into well-known concepts for use by a generic designer.

  • IVsDataObjectSelector: Enables getting data source–specific metadata about objects defined in the data object support XML file.

  • IDSRefBuilder: Provides the ability to create a Data Source Reference (DSRef) object that identifies one or more data objects.

This class implements the IVsDataSiteableObject<T> interface, which allows DDEX to site a data provider's DataConnectionSupport implementation with the IVsDataConnection object that is calling into it. This provides the implementation with context, as well as a means for retrieving Visual Studio services.

Notes to Inheritors:

Any derived class should implement the various abstract properties and methods to support their connection. A derived class should also override the protected CreateService method to provide its implementation of the connection services. When a state-change or message-received event occurs, a derived class should, when possible, call the protected OnStateChanged and OnMessageReceived methods.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.Framework.ServiceProvider
    Microsoft.VisualStudio.Data.Framework.DataSiteableServiceProvider<IVsDataConnection>
      Microsoft.VisualStudio.Data.Framework.DataConnectionSupport
        Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetConnectionSupport

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

DataConnectionSupport Members

Microsoft.VisualStudio.Data.Framework Namespace