public async Task OnButtonClick(string key) { // are we waiting for using response? if (_userChoice != null) { _userChoice.SetResult(key); } else { // forward to calling app await ButtonClick.InvokeAsync(key).ConfigureAwait(true); } }
private void OnButtonClick(string key) { ButtonClick.InvokeAsync(key); }