Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CancelCommand.Wrap does not propagate IsCancelled information #30

Open
bitbonk opened this issue Feb 14, 2020 · 0 comments · May be fixed by #31
Open

CancelCommand.Wrap does not propagate IsCancelled information #30

bitbonk opened this issue Feb 14, 2020 · 0 comments · May be fixed by #31
Assignees

Comments

@bitbonk
Copy link

bitbonk commented Feb 14, 2020

The current version CancelCommand.Wrap() does not propagate IsCancelled information to the Execution.IsCancelled of the parent AsyncCommand.

In the following code

public AsyncCommandsDemoViewModel(IDataClient dataClient)
{
    this.CancelGetData = new CancelCommand();
    this.GetData = new AsyncCommand(
        this.CancelGetData.Wrap(
            async cancellationToken =>
                this.Data = await dataClient.GetDataAsync(cancellationToken)));
}

if the CancelGetData command is executed, GetData.Execuction.IsCancelled never becomes true.

@bitbonk bitbonk linked a pull request Feb 14, 2020 that will close this issue
@StephenCleary StephenCleary self-assigned this Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants