Search Results for

    Show / Hide Table of Contents

    Class PluginManager

    Main entry point to the plug-in framework.

    Inheritance
    object
    PluginManager
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Sdl.Core.PluginFramework
    Assembly: Sdl.Core.PluginFramework.dll
    Syntax
    public static class PluginManager

    Properties

    DefaultPluginRegistry

    Returns the default plug-in registry.

    Declaration
    public static IPluginRegistry DefaultPluginRegistry { get; set; }
    Property Value
    Type Description
    IPluginRegistry

    Methods

    CreateDefaultPluginCache()

    Creates the default plug-in cache, stored in an XML file in the user's profile.

    Declaration
    public static IPluginCache CreateDefaultPluginCache()
    Returns
    Type Description
    IPluginCache

    CreatePluginRegistry(IPluginLocator, IPluginStateHandler, IPluginInitializer, IPluginTypeLoader, IPluginCache, IPluginFilter, bool, IObjectResolver)

    Creates a plug-in registry containing plug-ins from the specified plugin directory.

    Declaration
    public static IPluginRegistry CreatePluginRegistry(IPluginLocator pluginLocator, IPluginStateHandler pluginStateHandler, IPluginInitializer pluginInitializer, IPluginTypeLoader pluginTypeLoader, IPluginCache pluginCache, IPluginFilter filter, bool validate, IObjectResolver objectResolver = null)
    Parameters
    Type Name Description
    IPluginLocator pluginLocator

    A plug-in locator to locate the plug-in manifest files to be loaded.

    IPluginStateHandler pluginStateHandler

    Determines which plug-ins can or cannot be loaded.

    IPluginInitializer pluginInitializer

    Object that initializes plug-ins before any if its extensions is loaded.

    IPluginTypeLoader pluginTypeLoader

    Loads a specific type part of a plug-in.

    IPluginCache pluginCache

    A plug-in cache object, that can be used to restore plug-in state.

    IPluginFilter filter

    A plug-in filter that controls whether certain plug-ins or individual extensions are loaded. Can be null.

    bool validate

    True to validate all the plug-ins detected. Specify false to ensure lazy initialization.

    IObjectResolver objectResolver

    Add DI container to resolve objects

    Returns
    Type Description
    IPluginRegistry

    The newly created plug-in registry.

    Remarks

    Attach an event handler to this the PluginLoadException even before calling this method to get notification about plug-ins that fail to load.

    CreatePluginRegistry(IPluginLocator, IPluginStateHandler, IPluginInitializer, IPluginTypeLoader, IPluginCache, bool)

    Creates a plug-in registry containing plug-ins from the specified plugin directory.

    Declaration
    public static IPluginRegistry CreatePluginRegistry(IPluginLocator pluginLocator, IPluginStateHandler pluginStateHandler, IPluginInitializer pluginInitializer, IPluginTypeLoader pluginTypeLoader, IPluginCache pluginCache, bool validate)
    Parameters
    Type Name Description
    IPluginLocator pluginLocator

    A plug-in locator to locate the plug-in manifest files to be loaded.

    IPluginStateHandler pluginStateHandler

    Determines which plug-ins can or cannot be loaded.

    IPluginInitializer pluginInitializer

    Object that initializes plug-ins before any if its extensions is loaded.

    IPluginTypeLoader pluginTypeLoader

    Loads a specific type part of a plug-in.

    IPluginCache pluginCache

    A plug-in cache object, that can be used to restore plug-in state.

    bool validate

    True to validate all the plug-ins detected. Specify false to ensure lazy initialization.

    Returns
    Type Description
    IPluginRegistry

    The newly created plug-in registry.

    Remarks

    Attach an event handler to this the PluginLoadException even before calling this method to get notification about plug-ins that fail to load.

    ResolvePluginAssemblyReference(string)

    Resolve the assembly reference when the version is compatible with the current installed version.

    Declaration
    [Obsolete]
    public static string ResolvePluginAssemblyReference(string pluginAssemblyReference)
    Parameters
    Type Name Description
    string pluginAssemblyReference

    Assembly reference to resolve

    Returns
    Type Description
    string

    ResolvePluginAssemblyReference(string, IFrameworkConfiguration)

    Resolve the assembly reference when the version is compatible with the current installed version.

    Declaration
    public static string ResolvePluginAssemblyReference(string pluginAssemblyReference, IFrameworkConfiguration configuration)
    Parameters
    Type Name Description
    string pluginAssemblyReference

    Assembly reference to resolve

    IFrameworkConfiguration configuration

    Plugin Framework configuration data

    Returns
    Type Description
    string

    Events

    PluginLoadException

    Raised when an exception occurs while creating a plug-in registry instance using one of the factory methods of this class.

    Declaration
    public static event EventHandler<PluginLoadExceptionEventArgs> PluginLoadException
    Event Type
    Type Description
    EventHandler<PluginLoadExceptionEventArgs>
    Remarks

    Attach an event handler to this event before calling one of the factory methods of this class to get notification about plug-ins that fail to load.

    In this article
    • Properties
      • DefaultPluginRegistry
    • Methods
      • CreateDefaultPluginCache()
      • CreatePluginRegistry(IPluginLocator, IPluginStateHandler, IPluginInitializer, IPluginTypeLoader, IPluginCache, IPluginFilter, bool, IObjectResolver)
      • CreatePluginRegistry(IPluginLocator, IPluginStateHandler, IPluginInitializer, IPluginTypeLoader, IPluginCache, bool)
      • ResolvePluginAssemblyReference(string)
      • ResolvePluginAssemblyReference(string, IFrameworkConfiguration)
    • Events
      • PluginLoadException
    Back to top Generated by DocFX