Search Results for

    Show / Hide Table of Contents

    Method FindSubtypesOf

    | Improve this Doc View Source

    FindSubtypesOf<TSupertype>()

    Finds subtypes that implement the contract specified by TSupertype using the assemblies loaded by PluginLoader.

    Declaration
    public static IEnumerable<TSupertype> FindSubtypesOf<TSupertype>()
        where TSupertype : class
    Returns
    Type Description
    IEnumerable<TSupertype>

    An instance of type IEnumerable<T> that allows iterating over the instances that implement the contract specified by TSupertype.

    or

    Returns an empty enumerable if the TSupertype does not have any subtype, or if no assembly uses PluginAttribute.

    This method never returns null.

    Type Parameters
    Name Description
    TSupertype

    The type of contract (base type) shared between the host application and the plugins.

    Remarks

    This method uses the PluginAttribute type to create an instance of the subtype, so plugins must use it.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright ©2023 CPlugin.Net