Interface ICommandsService
A service that deals with commands loading, initialization and execution.
Namespace: TehGM.Wolfringo.Commands
Assembly: Wolfringo.Commands.dll
Syntax
public interface ICommandsService
Properties
| Improve this Doc View SourceCommands
Descriptors of all commands loaded to this commands service.
Declaration
IEnumerable<ICommandInstanceDescriptor> Commands { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<ICommandInstanceDescriptor> |
Methods
| Improve this Doc View SourceExecuteAsync(ICommandContext, CancellationToken)
Executes commands against a command context.
Declaration
Task<ICommandResult> ExecuteAsync(ICommandContext context, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| ICommandContext | context | Context to execute commands with. |
| System.Threading.CancellationToken | cancellationToken | Cancellation token to cancel execution with. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ICommandResult> | Result of the execution. |
StartAsync(CancellationToken)
Starts the Command Service.
Declaration
Task StartAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | Cancellation token to cancel loading with. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |