Wolfringo Wolfringo
Wolfringo Wolfringo
Wolfringo (c) 2020 TehGM
DocFX, DiscordFX theme.
Search Results for

    Class CommandsLoaderExtensions

    Extensions for a command loaders.

    Inheritance
    System.Object
    CommandsLoaderExtensions
    Namespace: TehGM.Wolfringo.Commands.Initialization
    Assembly: Wolfringo.Commands.dll
    Syntax
    public static class CommandsLoaderExtensions

    Methods

    | Improve this Doc View Source

    LoadFromAssembliesAsync(ICommandsLoader, IEnumerable<Assembly>, CancellationToken)

    Loads all command instance descriptors from assemblies.

    Declaration
    public static async Task<IEnumerable<ICommandInstanceDescriptor>> LoadFromAssembliesAsync(this ICommandsLoader loader, IEnumerable<Assembly> assemblies, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    ICommandsLoader loader

    The loader to perform loading with.

    System.Collections.Generic.IEnumerable<System.Reflection.Assembly> assemblies

    Assemblies to load descriptors from.

    System.Threading.CancellationToken cancellationToken

    Token that can be used to stop loading.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ICommandInstanceDescriptor>>

    Enumerable of all loaded command descriptors.

    | Improve this Doc View Source

    LoadFromMethodsAsync(ICommandsLoader, IEnumerable<MethodInfo>, CancellationToken)

    Loads all command instance descriptors from methods.

    Declaration
    public static async Task<IEnumerable<ICommandInstanceDescriptor>> LoadFromMethodsAsync(this ICommandsLoader loader, IEnumerable<MethodInfo> methods, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    ICommandsLoader loader

    The loader to perform loading with.

    System.Collections.Generic.IEnumerable<System.Reflection.MethodInfo> methods

    Methods to load descriptors from.

    System.Threading.CancellationToken cancellationToken

    Token that can be used to stop loading.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ICommandInstanceDescriptor>>

    Enumerable of all loaded command descriptors.

    | Improve this Doc View Source

    LoadFromTypesAsync(ICommandsLoader, IEnumerable<TypeInfo>, CancellationToken)

    Loads all command instance descriptors from types.

    Declaration
    public static async Task<IEnumerable<ICommandInstanceDescriptor>> LoadFromTypesAsync(this ICommandsLoader loader, IEnumerable<TypeInfo> types, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    ICommandsLoader loader

    The loader to perform loading with.

    System.Collections.Generic.IEnumerable<System.Reflection.TypeInfo> types

    Types to load descriptors from.

    System.Threading.CancellationToken cancellationToken

    Token that can be used to stop loading.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ICommandInstanceDescriptor>>

    Enumerable of all loaded command descriptors.