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

    Interface ICommandsLoader

    A service that loads Command instance descriptors from types and assemblies.

    Namespace: TehGM.Wolfringo.Commands.Initialization
    Assembly: Wolfringo.Commands.dll
    Syntax
    public interface ICommandsLoader

    Methods

    | Improve this Doc View Source

    LoadFromAssemblyAsync(Assembly, CancellationToken)

    Loads all command instance descriptors from an assembly.

    Declaration
    Task<IEnumerable<ICommandInstanceDescriptor>> LoadFromAssemblyAsync(Assembly assembly, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    System.Reflection.Assembly assembly

    Assembly 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

    LoadFromMethodAsync(MethodInfo, CancellationToken)

    Loads all command instance descriptors from a method.

    Declaration
    Task<IEnumerable<ICommandInstanceDescriptor>> LoadFromMethodAsync(MethodInfo method, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    System.Reflection.MethodInfo method

    Method 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

    LoadFromTypeAsync(TypeInfo, CancellationToken)

    Loads all command instance descriptors from a type.

    Declaration
    Task<IEnumerable<ICommandInstanceDescriptor>> LoadFromTypeAsync(TypeInfo type, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    System.Reflection.TypeInfo type

    Type 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.

    Extension Methods

    CommandsLoaderExtensions.LoadFromAssembliesAsync(ICommandsLoader, IEnumerable<Assembly>, CancellationToken)
    CommandsLoaderExtensions.LoadFromTypesAsync(ICommandsLoader, IEnumerable<TypeInfo>, CancellationToken)
    CommandsLoaderExtensions.LoadFromMethodsAsync(ICommandsLoader, IEnumerable<MethodInfo>, CancellationToken)