Update the Spectre.Console.Cli documentation with CancellationToken

Now that #1911 is merged, all `Execute` methods of commands have a new CancellationToken parameter. Update the documentation to reflect that.

New documentation shall still be written with an example on how to pass the top-level CancellationToken to the app.Run(Async) method.
This commit is contained in:
Cédric Luthi
2025-10-16 22:34:28 +02:00
committed by Patrik Svensson
parent 749f0fded8
commit e51812237e
5 changed files with 8 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ The following example validates the exit code and terminal output of a `Spectre.
_console = console;
}
public override int Execute(CommandContext context)
public override int Execute(CommandContext context, CancellationToken cancellationToken)
{
_console.WriteLine("Hello world.");
return 0;
@@ -78,7 +78,7 @@ public sealed class InteractiveCommandTests
_console = console;
}
public override int Execute(CommandContext context)
public override int Execute(CommandContext context, CancellationToken cancellationToken)
{
var fruits = _console.Prompt(
new MultiSelectionPrompt<string>()