Search Results for

    Show / Hide Table of Contents

    Class SortedObjectRegistry<TSortableExtensionAttribute, TExtensionType>

    Helper class for implementers of extension points, which allows easy instantiation of all extensions registered with a sortable extension point (SortableExtensionAttribute) identified by a specific type of extension attribute.

    Inheritance
    System.Object
    ObjectRegistry<TSortableExtensionAttribute, TExtensionType>
    SortedObjectRegistry<TSortableExtensionAttribute, TExtensionType>
    Inherited Members
    ObjectRegistry<TSortableExtensionAttribute, TExtensionType>.CreateObjects()
    ObjectRegistry<TSortableExtensionAttribute, TExtensionType>.ExtensionPoint
    Namespace: Sdl.Core.PluginFramework.Util
    Assembly: Sdl.Core.PluginFramework.dll
    Syntax
    public class SortedObjectRegistry<TSortableExtensionAttribute, TExtensionType> : ObjectRegistry<TSortableExtensionAttribute, TExtensionType> where TSortableExtensionAttribute : SortableExtensionAttribute where TExtensionType : class
    Type Parameters
    Name Description
    TSortableExtensionAttribute

    The type of sortable extension attribute, identifying the extension point.

    TExtensionType

    The type of the extension implementation classes for the extension point.

    Constructors

    SortedObjectRegistry(IPluginRegistry)

    Constructor.

    Declaration
    public SortedObjectRegistry(IPluginRegistry pluginRegistry)
    Parameters
    Type Name Description
    IPluginRegistry pluginRegistry

    The plug-in registry from which to retrieve the extensions.

    Methods

    CreateObjects()

    Creates an instance of all the objects registered with the extension point, sorts them, and returns them as an array.

    Declaration
    public override TExtensionType[] CreateObjects()
    Returns
    Type Description
    TExtensionType[]

    An array, containing a new instance of every object registered with the extension point, sorted according to the InsertBefore and InsertAfter properties.

    Overrides
    Sdl.Core.PluginFramework.ObjectRegistry<TSortableExtensionAttribute, TExtensionType>.CreateObjects()
    Exceptions
    Type Condition
    System.InvalidCastException

    Thrown when any of the created objects cannot be cast to the required type.

    On this page

    • Constructors
      • SortedObjectRegistry(IPluginRegistry)
    • Methods
      • CreateObjects()
    Back to top Generated by DocFX