I need to perform an async delete operation with user confirmation. Something like that:
public ReactiveAsyncCommand DeleteCommand { get; protected set; }
...
DeleteCommand = new ReactiveAsyncCommand();
DeleteCommand.RegisterAsyncAction(DeleteEntity);
...
private void DeleteEntity(object obj)
{
if (MessageBox.Show("Do you really want to delete this entity?", "Confirm", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
{
}
}
The problem is that the MessageBox will execute asynchronously. What is the best pattern in ReactiveUI to ask the user synchronously and then execute the method asynchronously?
source
share