Refactor cancellation (#30)

This commit is contained in:
Moophic
2019-10-31 14:39:56 +02:00
committed by Alexey Golub
parent e8f53c9463
commit af63fa5a1f
27 changed files with 93 additions and 70 deletions

View File

@@ -32,7 +32,7 @@ namespace CliFx.Demo.Commands
_libraryService = libraryService;
}
public Task ExecuteAsync(IConsole console, CancellationToken cancellationToken)
public Task ExecuteAsync(IConsole console)
{
// To make the demo simpler, we will just generate random publish date and ISBN if they were not set
if (Published == default)

View File

@@ -21,7 +21,7 @@ namespace CliFx.Demo.Commands
_libraryService = libraryService;
}
public Task ExecuteAsync(IConsole console, CancellationToken cancellationToken)
public Task ExecuteAsync(IConsole console)
{
var book = _libraryService.GetBook(Title);

View File

@@ -17,7 +17,7 @@ namespace CliFx.Demo.Commands
_libraryService = libraryService;
}
public Task ExecuteAsync(IConsole console, CancellationToken cancellationToken)
public Task ExecuteAsync(IConsole console)
{
var library = _libraryService.GetLibrary();

View File

@@ -20,7 +20,7 @@ namespace CliFx.Demo.Commands
_libraryService = libraryService;
}
public Task ExecuteAsync(IConsole console, CancellationToken cancellationToken)
public Task ExecuteAsync(IConsole console)
{
var book = _libraryService.GetBook(Title);