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

    Interface ICommandInstance

    Represents a command instance.

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

    Methods

    | Improve this Doc View Source

    CheckMatchAsync(ICommandContext, IServiceProvider, CancellationToken)

    Determines whether the command should execute.

    Declaration
    Task<ICommandResult> CheckMatchAsync(ICommandContext context, IServiceProvider services, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    ICommandContext context

    Context of the command.

    System.IServiceProvider services

    Service provider that can be used during the checks.

    System.Threading.CancellationToken cancellationToken

    Cancellation token to cancel the checks.

    Returns
    Type Description
    System.Threading.Tasks.Task<ICommandResult>

    Result of the check.

    | Improve this Doc View Source

    ExecuteAsync(ICommandContext, IServiceProvider, ICommandResult, Object, CancellationToken)

    Executes the command.

    Declaration
    Task<ICommandResult> ExecuteAsync(ICommandContext context, IServiceProvider services, ICommandResult matchResult, object handler, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    ICommandContext context

    Context of the command.

    System.IServiceProvider services

    Services provider for injecting parameters into command method.

    ICommandResult matchResult

    Result of the pre-run check.

    System.Object handler

    Handler object to execute the command method in.

    System.Threading.CancellationToken cancellationToken

    Cancellation token to cancel the execution.

    Returns
    Type Description
    System.Threading.Tasks.Task<ICommandResult>

    Result of the execution.