Share via


DataConnection Class

Definition

Supports a connection to a data source.

public ref class DataConnection abstract : Microsoft::VisualStudio::Data::ServiceProvider, ICloneable, IDisposable
public abstract class DataConnection : Microsoft.VisualStudio.Data.ServiceProvider, ICloneable, IDisposable
type DataConnection = class
    inherit ServiceProvider
    interface ICloneable
    interface IDisposable
Public MustInherit Class DataConnection
Inherits ServiceProvider
Implements ICloneable, IDisposable
Inheritance
DataConnection
Implements

Constructors

DataConnection()

Class constructor. Instantiates a new instance of the DataConnection class.

Properties

AsyncCommand

Retrieves an object that can perform asynchronous derivation and execution of commands on the data source.

Command

Retrieves an object that can perform derivation and execution of commands on the data source.

ConnectionSupport

Retrieves the underlying data provider connection support object that is being used to support the current data connection instance.

ConnectionTimeout

Retrieves or sets the amount of time, in seconds, before a command to open a connection times out.

DisplayConnectionString

Retrieves or sets unencrypted connection information in the form of a DDEX-provider-specific string.

EncryptedConnectionString

Retrieves or sets encrypted connection information in the form of a DPAPI-encrypted, provider-specific string.

IsLockedForExclusiveAccess

Retrieves a Boolean value indicating whether the current connection is locked by a client for exclusive access.

ObjectChangeEvents

Retrieves an object that provides a set of events raised when data objects on the data source are added, changed, or removed.

ObjectIdentifierConverter

Retrieves an object that can convert data object identifiers from formatted strings to unformatted parts and vice versa.

ObjectIdentifierResolver

Retrieves an object that can resolve data object identifiers through both expansion and contraction.

ObjectItemComparer

Retrieves an object that can compare identifier parts and properties on data objects.

ObjectSupport

Retrieves an object that provides an XML stream defining the various DDEX data object types supported by the current data connection.

Provider

Retrieves the unique identifier of the DDEX Provider for the current data connection.

ProviderObjectIsLocked

Retrieves a Boolean value indicating whether the underlying DDEX Provider object is locked for use by a client.

ServiceTypes

Retrieves a list of service types used to convert the unmanaged QueryService method call, in which a service GUID is specified, into a managed IServiceProvider.GetService method call, in which a managed type is specified.

(Inherited from ServiceProvider)
Source

Retrieves the globally unique identifier (GUID) of the data source for the current data connection, if any.

SourceInformation

Retrieves an object that provides a set of well known name/value pairs describing the characteristics of the data source.

SourceVersionComparer

Retrieves an object that allows you to compare data-source-specific version numbers.

State

Retrieves the current state of this data connection.

Transaction

Retrieves an object that enables transaction processing; that is, allows you to begin, commit, and rollback transactions on the data source.

ViewSupport

Retrieves an object that provides an XML stream defining the various data views supported by the current data connection.

Methods

Clone()

Creates a cloned instance of this data connection, which retains the same connection properties and state as the original.

Close()

Closes the current data connection.

Dispose()

Disposes of the current data connection and all its associated resources.

Dispose(Boolean)

Supports the DDEX infrastructure and is not intended to be used directly from your code.

EquivalentTo(Guid, String, Boolean)

Retrieves a Boolean value indicating whether or not information about the current connection is equivalent, in a design time sense, to the specified connection information.

Finalize()

Finalizes the connection.

GetExclusiveAccessProxy(Int32)

Retrieves a proxy instance that allows the caller exclusive access to the data connection.

GetLockedProviderObject()

Retrieves the underlying data provider object, if any, which supports the current data connection.

GetLockedProviderObject(Int32)

Retrieves the underlying data provider object, if any, which supports the current data connection.

GetService(Guid)

Retrieves a service with a specified service GUID.

(Inherited from ServiceProvider)
GetService(Type)

Retrieves a service of the specified type.

(Inherited from ServiceProvider)
GetServiceImpl(Guid)

Provides the implementation for retrieving a service with a specific GUID.

(Inherited from ServiceProvider)
GetServiceImpl(Type)

Provides the implementation for retrieving a service of a specific type.

(Inherited from ServiceProvider)
OnMessageReceived(DataConnectionMessageReceivedEventArgs)

Handler for the MessageReceived event.

OnStateChanged(DataConnectionStateChangedEventArgs)

Handler for the StateChanged event.

Open()

Opens this data connection.

ReleaseExclusiveAccessProxy()

Releases an existing exclusive access proxy, as provided with a call to the GetExclusiveAccessProxy(Int32) method.

UnlockProviderObject()

Unlocks a DDEX Provider object that has been locked using a call to the GetLockedProviderObject(Int32)method.

Events

MessageReceived

Event that is raised when a message is received from the data source.

StateChanged

Event that is raised when the state of the data connection has changed.

Explicit Interface Implementations

ICloneable.Clone()

Creates a new connection object instance that is a copy of the current instance.

IServiceProvider.QueryService(Guid, Guid, IntPtr)

Performs as a factory for services that are exposed through an implementation of IServiceProvider.

(Inherited from ServiceProvider)

Extension Methods

QueryService(IServiceProvider, Guid)

Gets a service exposed by a service provider based on its service GUID.

QueryService<TService>(IServiceProvider)

Gets a service exposed by a service provider based on its service type.

Applies to