Partager via


AdoDotNetConnectionSupport Class

Provides an implementation of the IVsDataConnectionSupport interface, and an indirect implementation of the IVsDataCommand, IVsDataAsyncCommand, and IVsDataTransaction interfaces, by using appropriate ADO.NET objects.

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

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

Syntax

'Declaration
Public Class AdoDotNetConnectionSupport _
    Inherits DataConnectionSupport _
    Implements IVsDataSiteableObject(Of IVsDataProvider)
public class AdoDotNetConnectionSupport : DataConnectionSupport, 
    IVsDataSiteableObject<IVsDataProvider>
public ref class AdoDotNetConnectionSupport : public DataConnectionSupport, 
    IVsDataSiteableObject<IVsDataProvider^>
type AdoDotNetConnectionSupport =  
    class 
        inherit DataConnectionSupport 
        interface IVsDataSiteableObject<IVsDataProvider>
    end
public class AdoDotNetConnectionSupport extends DataConnectionSupport implements IVsDataSiteableObject<IVsDataProvider>

The AdoDotNetConnectionSupport type exposes the following members.

Constructors

  Name Description
Public method AdoDotNetConnectionSupport Initializes an instance of the AdoDotNetConnectionSupport class.

Top

Properties

  Name Description
Protected property Connection Gets the DbConnection object being used by the current connection support instance.
Public property ConnectionString Gets or sets a string representation of information required to establish a specified data source connection. (Overrides DataConnectionSupport.ConnectionString.)
Public property ConnectionTimeout Gets or sets the amount of time, in seconds, to wait to establish a connection before terminating the attempt and generating a time-out error. (Overrides DataConnectionSupport.ConnectionTimeout.)
Protected property CurrentCommand Gets the DbCommand object currently being used by the current connection support instance.
Protected property CurrentTransaction Gets the DbTransaction object currently being used by the current connection support instance.
Protected property InAsyncMode Gets a value indicating whether the connection is in an asynchronous mode.
Protected property ParentProvider Gets the current instance of the parent service provider. (Inherited from ServiceProvider.)
Public property ProviderObject Gets the underlying provider object for the specified connection. (Overrides DataConnectionSupport.ProviderObject.)
Protected property ServiceProvider Gets the global Visual Studio service provider. (Inherited from DataConnectionSupport.)
Public property Site Gets or sets the site. (Inherited from DataSiteableServiceProvider<T>.)
Public property State Gets the state of the data connection. (Overrides DataConnectionSupport.State.)

Top

Methods

  Name Description
Public method AddService(Type, ServiceCreatorCallback) Adds the specified service to the internal collection of services. (Inherited from ServiceProvider.)
Public method AddService(Type, Object) Adds the specified service to the internal collection of services. (Inherited from ServiceProvider.)
Public method AddService(Type, ServiceCreatorCallback, Boolean) Adds the specified service to the internal collection of services or to the parent service container. (Inherited from ServiceProvider.)
Public method AddService(Type, Object, Boolean) Adds the specified service to the collection of service objects or to the parent service container. (Inherited from ServiceProvider.)
Protected method BeginTransactionCore Initiates a transaction.
Public method Close Closes the current data connection. (Overrides DataConnectionSupport.Close().)
Protected method CommitTransactionCore Commits a transaction.
Protected method CreateParameterCore Creates a new data parameter with interface IVsDataProvider.
Protected method CreateParameterFrom Creates a new data parameter with interface IVsDataProvider, using a copy of the specified data parameter.
Protected method CreateService Creates a new service object based on the specified interface service type. (Overrides DataConnectionSupport.CreateService(IServiceContainer, Type).)
Protected method DeriveParametersCore Derives parameters that can be specified for a given command.
Protected method DeriveParametersOn Override to derive parameters from the given command.
Protected method DeriveSchemaCore Derives the schema returned from a specified command, indicating the layout of items and blocks in a given data reader.
Public method Dispose() Releases all resources held by the data connection. (Inherited from DataConnectionSupport.)
Protected method Dispose(Boolean) Releases all resources held by the data connection. (Overrides DataConnectionSupport.Dispose(Boolean).)
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method ExecuteCore Executes a specified command, optionally with parameters, and returns results as an IVsDataReader object.
Protected method ExecuteWithoutResultsCore Executes a specified command, optionally with parameters. Does not return any query results.
Protected method Finalize Releases all resources held by the data connection when the data connection support object is destroyed. (Inherited from DataConnectionSupport.)
Protected method GetCommand Constructs a DbCommand object from the given command string.
Protected methodStatic member GetCommandType Converts an enumeration value from DataCommandType to its corresponding value in the CommandType enumeration.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetService(Guid) Retrieves a service with a specified service GUID. (Inherited from ServiceProvider.)
Public method GetService(Type) Retrieves a service of the specified type. (Inherited from ServiceProvider.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Initialize Initializes the specified ADO.NET connection, using a specified provider. (Overrides DataConnectionSupport.Initialize(Object).)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnMessageReceived Handles the MessageReceived event. (Inherited from DataConnectionSupport.)
Protected method OnSiteChanged Raises the SiteChanged event. (Inherited from DataSiteableServiceProvider<T>.)
Protected method OnStateChanged Handles the StateChanged event. (Inherited from DataConnectionSupport.)
Public method Open Opens the specified data connection. (Overrides DataConnectionSupport.Open(Boolean).)
Protected method PrepareCore Prepares the specified command on the data source to be executed; the command can be executed multiple times, with varying parameters.
Public method RemoveService(Type) Removes the specified service from the internal services collection (Inherited from ServiceProvider.)
Public method RemoveService(Type, Boolean) Removes the specified service from the internal services collection or from the parent service container. (Inherited from ServiceProvider.)
Protected method RollbackTransactionCore Rolls back, or voids, a transaction and returns the new current transaction level.
Protected methodStatic member SetParameters Adds new parameters to the given DbCommand command from the specified array of IVsDataParameter parameters.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event MessageReceived Occurs when a message is received from the data source. (Inherited from DataConnectionSupport.)
Public event SiteChanged Occurs when the site has changed. (Inherited from DataSiteableServiceProvider<T>.)
Public event StateChanged Occurs when the state of the data connection has changed. (Inherited from DataConnectionSupport.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IServiceProvider.QueryService Performs as a factory for services that are exposed through an implementation of IServiceProvider. (Inherited from ServiceProvider.)
Explicit interface implemetationPrivate property IVsDataSiteableObject<IVsDataProvider>.Site Gets the IVsDataProvider object currently being used by the current connection support instance.

Top

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.Framework.AdoDotNet Namespace