Partager via


AdoDotNetProviderObjectFactory Class

Provides an implementation of the DataProviderObjectFactory class for DDEX Providers whose underlying technology is ADO.NET.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.ObjectWithSite
    Microsoft.VisualStudio.Data.DataProviderObjectFactory
      Microsoft.VisualStudio.Data.AdoDotNet.AdoDotNetProviderObjectFactory

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

Syntax

'Declaration
Public Class AdoDotNetProviderObjectFactory _
    Inherits DataProviderObjectFactory
public class AdoDotNetProviderObjectFactory : DataProviderObjectFactory
public ref class AdoDotNetProviderObjectFactory : public DataProviderObjectFactory
type AdoDotNetProviderObjectFactory =  
    class 
        inherit DataProviderObjectFactory 
    end
public class AdoDotNetProviderObjectFactory extends DataProviderObjectFactory

The AdoDotNetProviderObjectFactory type exposes the following members.

Constructors

  Name Description
Public method AdoDotNetProviderObjectFactory Class constructor. Instantiates a new instance of the AdoDotNetProviderObjectFactory class.

Top

Properties

  Name Description
Protected property DataProvider Retrieves the DDEX provider for which this class creates objects. (Inherited from DataProviderObjectFactory.)
Public property Site Retrieves or sets the object site. (Inherited from ObjectWithSite.)

Top

Methods

  Name Description
Public method CreateObject Supports creation of the DataConnectionProperties and DataConnectionSupport types. (Overrides DataProviderObjectFactory.CreateObject(Type).)
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 GetAssembly Locates an assembly given an assembly string. (Inherited from DataProviderObjectFactory.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType() Gets the Type of the current instance. (Inherited from Object.)
Public method GetType(String) Retrieves a type definition given a type name. (Inherited from DataProviderObjectFactory.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnSiteChanged Raises the SiteChanged event. (Inherited from ObjectWithSite.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event SiteChanged Event that is raised when the Site property is changed. (Inherited from ObjectWithSite.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IObjectWithSite.GetSite Retrieves the last site set using the IObjectWithSite.SetSite method. In cases where there is no known site, the object returns an exception. (Inherited from ObjectWithSite.)
Explicit interface implemetationPrivate method IObjectWithSite.SetSite Provides the site's pointer to the site object. (Inherited from ObjectWithSite.)

Top

Remarks

ADO.NET already provides a number of the features required to support a DDEX Provider, so this class automatically provides certain default implementations for classes if not overridden by a provider.

The following classes are implemented automatically:

In addition to these base classes that that you can create directly using this factory object, the following classes are also implemented:

  • DataObjectEnumerator: ADO.NET has a generic mechanism for enumerating data objects. Two implementations are provided - one to provide "root" information, and another to enumerate collections of data using the GetSchema API.

  • DataSourceInformation: ADO.NET has a generic mechanism for providing data source information. The base class may, however, not always provide complete information.

  • DataCommand: ADO.NET already has a generic mechanism for executing commands.

  • DataParameter: ADO.NET has a generic mechanism for working with parameters; however, it is somewhat limited insofar as it is not aware of back-end-specific parameter types.

  • DataTransaction: ADO.NET has a generic mechanism for beginning and ending transactions.

  • DataReader: All ADO.NET providers have various ways of exposing data. The AdoDotNetDataReader class provides a complete implementation using the ADO.NET IDataReader interface. The AdoDotNetDataTableReader class provides a complete implementation of this interface using the ADO.NET DataTable object. More implementations may be added if needed.

  • DataObjectConceptMapper: ADO.NET exposes a generic set of data types which this class uses to implement data type mappings to the various data type property concepts recognized by DDEX.

  • DataObjectIdentifierConverter: ADO.NET exposes some information that can be used to produce a reasonable base implementation of this class. It may not work correctly in all scenarios.

  • DataObjectItemComparer: ADO.NET exposes some information that can be used to produce a simple implementation of this class. It will only work for basic scenarios.

This class relies on there being a ProviderInvariantName property specified in the registry by the DDEX provider that tells the class what the ADO.NET invariant name of the provider is. This is passed down to the specific objects to ensure that the correct implementations of ADO.NET objects are created.

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

DataProviderObjectFactory