Class Command<T>
Base class of a command that returns a result
public abstract class Command<T> : BaseCommand
Type Parameters
TType of the command result
- Inheritance
-
Command<T>
- Derived
- Inherited Members
Constructors
Command()
protected Command()
Methods
ExecuteAsync(CancellationToken)
Reserved for the actual command implementation in the control server
public virtual Task<T> ExecuteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenOptional cancellation token
Returns
- Task<T>
Command result
InvokeAsync(CancellationToken)
Invokes the command implementation
public override Task<object?> InvokeAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenOptional cancellation token