Cancellation support (#28)

This commit is contained in:
Moophic
2019-10-30 18:37:32 +02:00
committed by Alexey Golub
parent 25538f99db
commit ed458c3980
27 changed files with 146 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System.Threading;
using System.Threading.Tasks;
using CliFx.Attributes;
using CliFx.Exceptions;
using CliFx.Services;
@@ -14,6 +15,6 @@ namespace CliFx.Tests.TestCommands
[CommandOption("msg", 'm')]
public string Message { get; set; }
public Task ExecuteAsync(IConsole console) => throw new CommandException(Message, ExitCode);
public Task ExecuteAsync(IConsole console, CancellationToken cancellationToken) => throw new CommandException(Message, ExitCode);
}
}