public override void CanClose(Action <bool> callback) { var result = _messagePresenter.ShowQuestion("Are you sure you want to close window?"); // await DoWorkAsync(); can't be executed ;( callback(result); }
public async Task <bool> OnClosingAsync() { var result = _messagePresenter.ShowQuestion("Are you sure you want to close window?"); // await DoWorkAsync(); can't be executed ;( return(result); }
private async Task <bool> TryCloseAsync() { if (_messagePresenter.ShowQuestion("Are you sure you want to close window?")) { await DoWorkAsync(); return(true); } return(false); }