IAsyncCancelableCommand Interface

Represents a subcommand that executes asynchronously and supports cancellation.

Definition

Namespace: Ookii.CommandLine.Commands
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public interface IAsyncCancelableCommand : IAsyncCommand, 
	ICommand
Implements
IAsyncCommand, ICommand

Remarks

This interface adds a CancellationToken property to the IAsyncCommand interface. The CommandManagerRunCommandAsync(CancellationToken) method and its overloads will set this property prior to calling the IAsyncCommandRunAsync method.

Use the AsyncCommandBase class as a base class for your command to get a default implementation of the ICommandRun method and the CancellationToken property.

Properties

CancellationToken Gets or sets the cancellation token that can be used by the IAsyncCommandRunAsync method.

Methods

Run Runs the command.
(Inherited from ICommand)
RunAsync Runs the command asynchronously.
(Inherited from IAsyncCommand)

See Also