Udostępnij za pośrednictwem


DataConnectionSupport Class

Definition

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

public ref class DataConnectionSupport abstract : Microsoft::VisualStudio::Data::ServiceProviderWithSite, IDisposable
public abstract class DataConnectionSupport : Microsoft.VisualStudio.Data.ServiceProviderWithSite, IDisposable
type DataConnectionSupport = class
    inherit ServiceProviderWithSite
    interface IDisposable
Public MustInherit Class DataConnectionSupport
Inherits ServiceProviderWithSite
Implements IDisposable
Inheritance
Derived
Implements

Constructors

DataConnectionSupport()

Class constructor. Instantiates a nonparameterized instance of the DataConnectionSupport class.

Properties

ConnectionString

Retrieves or sets a string representation of information required to establish a given data source connection.

ConnectionTimeout

Retrieves or sets the amount of time, in seconds, to wait to establish a connection before terminating the attempt and generating a timeout error.

ProviderObject

Retrieves the underlying data provider object for the specified connection.

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)
Site

Retrieves or sets the site object instance.

(Inherited from ServiceProviderWithSite)
State

Retrieves the state of the data connection.

Methods

Close()

Closes the specified connection.

Dispose()

Performs tasks associated with freeing, releasing, or resetting resources.

Dispose(Boolean)

Performs tasks associated with freeing, releasing, or resetting resources.

Finalize()

Finalizes the 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)

Allows you to obtain implementation services.

Initialize(Object)

Initializes the specified connection, optionally from an existing data provider object.

OnSiteChanged(EventArgs)

Raises the SiteChanged event.

(Inherited from ServiceProviderWithSite)
Open(Boolean)

Opens the specified connection.

RaiseMessageReceived(String)

Raises the MessageReceivedevent on the enclosing DataConnection instance.

RaiseStateChanged(DataConnectionState, DataConnectionState)

Raises the state changed event on the enclosing DataConnection instance.

Events

SiteChanged

Event raised when the Site property has changed.

(Inherited from ServiceProviderWithSite)

Explicit Interface Implementations

IObjectWithSite.GetSite(Guid, IntPtr)

Retrieves the last site set using the IObjectWithSite.SetSite(Object) method. If there is no known site, an exception is thrown.

(Inherited from ServiceProviderWithSite)
IObjectWithSite.SetSite(Object)

Provides a site's IUnknown pointer to a given object.

(Inherited from ServiceProviderWithSite)
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