private async Task <object> ImportFromWeb() { logger.Debug($"ImportFromWeb started. Task.IsNotCompleted={CommandImportWeb.Execution?.IsNotCompleted}"); try { DeckImporter deckImporter = new DeckImporter(this.trackerFactory); var tcs = new TaskCompletionSource <bool>(); deckImporter.ImportFinished(tcs); //logger.Debug($"ImportFromWeb awaiting {CommandImportWeb.Execution}"); //await Task.Delay(5000) ; await deckImporter.ImportFromWeb(WebDeckUrl); logger.Debug($"ImportFromWeb done. tcs={tcs.Task.Result}; Errors={deckImporter.sbErrors.ToString()}"); if (tcs.Task.Result) { deck.DeckUrl = WebDeckUrl; deck.SelectedVersion.Cards = new PropertiesObservableCollection <CardInstance>(deckImporter.Cards); deck.Name = deckImporter.DeckName; deck.Class = ClassAttributesHelper.FindSingleClassByAttribute(deckImporter.Cards.SelectMany(c => c.Card.Attributes).Distinct()); //curr version shour equal deck.selected version, attch change to reflect clink for remove in deck history CurrentVersion.Cards.CollectionChanged += (s, e) => { RaisePropertyChangedEvent(nameof(ChangesFromCurrentVersion)); }; RaisePropertyChangedEvent(String.Empty); ShowImportFromUrlPanel = false; } else { WebDeckUrlImportError = deckImporter.sbErrors.ToString(); } } catch (Exception ex) { WebDeckUrlImportError = ex.Message; } return("done"); }