DataSourceSpecializer Class

Provides the ability to specialize the behavior of a DDEX provider, depending on the data source to which it is connected.

System.Object
  Microsoft.VisualStudio.Data.Framework.DataSourceSpecializer

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

public abstract class DataSourceSpecializer : IVsDataSourceSpecializer, 
	IVsDataSiteableObject<IServiceProvider>

The DataSourceSpecializer type exposes the following members.

  NameDescription
Protected methodDataSourceSpecializerInitializes a new instance of the DataSourceSpecializer class.
Top

  NameDescription
Protected propertyServiceProviderRetrieves the current instance of the service provider as a IServiceProvider object.
Top

  NameDescription
Public methodCreateObjectCreates a DDEX provider–implemented object of the given type that is specialized for the specified data source.
Public methodDeriveSourceDetermines which data source supported by the provider is represented by the given connection string.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetAssemblyLocates an assembly, given an assembly string and a data source GUID.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetType()Gets the Type of the current instance. (Inherited from Object.)
Public methodGetType(Guid, String)Retrieves a type definition, given a type name and a data source GUID.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Explicit interface implemetationPrivate propertyIVsDataSiteableObject<IServiceProvider>.SiteGets the current instance of the service provider as a IServiceProvider object.
Top

Some DDEX providers behave differently when connected to different data sources. The most extreme example is with generic providers like OLE DB and ODBC, whose specific providers or drivers define their behavior. A simpler example is the differentiation between a SQL Server connection and a SQL Server Database File connection.

Although the same provider is used to connect to each data source, the design time experience may be different. A DDEX provider can implement this class to provide ways of customizing the behavior of the provider, depending on its data source.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft