Skip to content

CLI Command RunAsync support passing in/propagating a CancelationToken #701

@Simonl9l

Description

@Simonl9l

Is your feature request related to a problem? Please describe.
By convention in DotNet Core one wild supply a CancellationToken into an Async method when awaited!

Describe the solution you'd like
Support passing in a CancelationToken such that is propagated to the AsyncCommand.ExecuteAsync and for that matter provide a ValidateAsync that also takes the token.

In this way a command handler can detect it's being canceled (via async Main for example)

Describe alternatives you've considered

One can make the organ available via static and class scoped but its not very well encapsulated.

Additional context
N/A


Please upvote 👍 this issue if you are interested in it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo 🕑

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions