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.

Inheritance Hierarchy

System.Object
  Microsoft.Data.Schema.Extensibility.ExtensionManager

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

Syntax

'Declaration
Public NotInheritable Class ExtensionManager
public sealed class ExtensionManager
public ref class ExtensionManager sealed
[<Sealed>]
type ExtensionManager =  class end
public final class ExtensionManager

The ExtensionManager type exposes the following members.

Constructors

  Name Description
Public method ExtensionManager Initializes an instance of ExtensionManager by using the qualified type name of the DatabaseSchemaProvider.

Top

Properties

  Name Description
Public propertyStatic member AllDatabaseSchemaProviderTypes Gets a list of all available database schema provider types.
Public property DatabaseSchemaProvider Gets the associated data source provider instance.
Public property Errors Gets a read-only collection of errors from the loading operation if the creation of this manager triggered the type load.
Public propertyStatic member UseVisualStudioInstalledExtensionPaths Gets 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().

Top

Methods

  Name Description
Public methodStatic member AddExtensionLoadPath Adds a path of the list of extension load paths.
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 GetExtension<TInterfaceType>(Type) Retrieves an ExtensionHandle<TInterfaceType> that matches the provided Type.
Public method GetExtension<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 method GetExtension<TInterfaceType>(String, String) Finds an extension from loaded extensions in the current ExtensionManager by using the provided assembly name and type name.
Public method GetExtensions<TInterfaceType> Returns a list of the extension types for the provided extension interface type that have loaded successfully.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetSingleExtension<TInterfaceType> Returns a single ExtensionHandle object.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public methodStatic member InstantiateType<T>(Type) Instantiates a type and casts it as an interface.
Public methodStatic member InstantiateType<T, TProxy>(Type) Instantiates a type and casts it as an interface.
Public method IsCompatibleWithCurrentProvider Returns a value that indicates whether passing a Data Services Provider name or key is compatible with the current provider in this ExtensionManager.
Public method IsExtension<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 method IsExtension<TInterfaceType>(ExtensionHandle) Checks whether the provided extension handle is valid and is loaded into the current ExtensionManager.
Public methodStatic member LoadType Searches 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 method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryGetSingleExtension<TInterfaceType> Tries to acquire a single extension of the provided Generic type.

Top

Remarks

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 nulla null reference (Nothing in Visual Basic) is specified as the type, those extensions that are specified to have a BindingClassification value of None will be loaded.

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.Data.Schema.Extensibility Namespace

DatabaseSchemaProvider

BindingClassification

Other Resources

Extending the Database Features of Visual Studio