mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-10-25 15:19:23 +00:00
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:
committed by
Patrik Svensson
parent
749f0fded8
commit
e51812237e
@@ -61,7 +61,7 @@ in the previous step.
|
||||
```csharp
|
||||
public class AddPackageCommand : Command<AddPackageSettings>
|
||||
{
|
||||
public override int Execute(CommandContext context, AddPackageSettings settings)
|
||||
public override int Execute(CommandContext context, AddPackageSettings settings, CancellationToken cancellationToken)
|
||||
{
|
||||
// Omitted
|
||||
return 0;
|
||||
@@ -70,7 +70,7 @@ public class AddPackageCommand : Command<AddPackageSettings>
|
||||
|
||||
public class AddReferenceCommand : Command<AddReferenceSettings>
|
||||
{
|
||||
public override int Execute(CommandContext context, AddReferenceSettings settings)
|
||||
public override int Execute(CommandContext context, AddReferenceSettings settings, CancellationToken cancellationToken)
|
||||
{
|
||||
// Omitted
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user