This documentation is archived and is not being maintained.

ExtensionManager Class

Maintains an extension context and is responsible for loading extensions. Extensions include the DatabaseSchemaProvider instance that is used by a database project. Each database project maintains a single ExtensionManager instance.


Namespace:  Microsoft.Data.Schema.Extensibility
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

public sealed class ExtensionManager

The ExtensionManager type exposes the following members.

Public methodExtensionManagerInitializes an instance of ExtensionManager by using the qualified type name of the DatabaseSchemaProvider.

Public propertyStatic memberAllDatabaseSchemaProviderTypesGets a list of all available database schema provider types.
Public propertyDatabaseSchemaProviderGets the associated data source provider instance.
Public propertyErrorsGets a read-only collection of errors from the loading operation if the creation of this manager triggered the type load.
Public propertyStatic memberUseVisualStudioInstalledExtensionPathsGets or sets whether to load extension.xml files and extension assemblies from the Visual Studio extensions path(s) and also to any paths that are specified through AddExtensionLoadPath().

Public methodStatic memberAddExtensionLoadPathAdds a path of the list of extension load paths.
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 methodGetExtension<TInterfaceType>(Type)Retrieves an ExtensionHandle<TInterfaceType> that matches the provided Type.
Public methodGetExtension<TInterfaceType>(ExtensionHandle)Finds an extension in the current ExtensionManager of type IExtension and configuration as the object that is identified by the ExtensionHandle parameter value.
Public methodGetExtension<TInterfaceType>(String, String)Finds an extension from loaded extensions in the current ExtensionManager by using the provided assembly name and type name.
Public methodGetExtensions<TInterfaceType>Returns a list of the extension types for the provided extension interface type that have loaded successfully.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetSingleExtension<TInterfaceType>Returns a single ExtensionHandle object.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberInstantiateType<T>(Type)Instantiates a type and casts it as an interface.
Public methodStatic memberInstantiateType<T, TProxy>(Type)Instantiates a type and casts it as an interface.
Public methodIsCompatibleWithCurrentProviderReturns a value that indicates whether passing a Data Services Provider name or key is compatible with the current provider in this ExtensionManager.
Public methodIsExtension<TInterfaceType>(Type)Checks whether a valid extension occurs that matches the provided type, and that does not have a configuration in the current instance.
Public methodIsExtension<TInterfaceType>(ExtensionHandle)Checks whether the provided extension handle is valid and is loaded into the current ExtensionManager.
Public methodStatic memberLoadTypeSearches for and loads satellite types that are defined in DLLs. These DLLs can be located in the global assembly cache (GAC), the VS BaseDir, or the VSTSDB\Extensions folder.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodTryGetSingleExtension<TInterfaceType>Tries to acquire a single extension of the provided Generic type.

The ExtensionManager instance is associated with a specified type of DatabaseSchemaProvider. The ExtensionManager holds an instance of DatabaseSchemaProvider, and it loads all extension types that are specified as compatible with this Data Service Provider. If null is specified as the type, those extensions that are specified to have a BindingClassification value of None will be loaded.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.