mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-12-26 15:57:58 +01:00
Add top-level CancellationToken support to Spectre.Console.Cli
Also raise CA2016 (forward the CancellationToken parameter to methods that take one) to warning Fixes #701
This commit is contained in:
committed by
Patrik Svensson
parent
d90e94dbb3
commit
f5f61ca610
@@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Generator.Commands.Samples;
|
||||
using Spectre.Console;
|
||||
using Spectre.Console.Cli;
|
||||
@@ -38,7 +39,7 @@ namespace Generator.Commands
|
||||
_console = new AsciiCastConsole(console);
|
||||
}
|
||||
|
||||
public override int Execute([NotNull] CommandContext context, [NotNull] Settings settings)
|
||||
public override int Execute([NotNull] CommandContext context, [NotNull] Settings settings, CancellationToken cancellationToken)
|
||||
{
|
||||
var samples = typeof(BaseSample).Assembly
|
||||
.GetTypes()
|
||||
|
||||
Reference in New Issue
Block a user