public MainViewModel(INavigationService navigationService , IDialogService dialogService , ISymbolService symbolService , IHistoricalPriceViewModel historicalPriceViewModel , ISettingsViewModel settings) : base(navigationService, dialogService) { PriceViewModel = historicalPriceViewModel; Settings = settings; SearchSymbols = ReactiveCommand.CreateFromTask <object, ObservableCollection <BloombergSymbol> >(async _ => { IsLoading = true; var result = await symbolService.SearchSymbol(Keyword); IsLoading = false; return(new ObservableCollection <BloombergSymbol>(result)); }, this.WhenAny(x => x.Keyword, x => !string.IsNullOrEmpty(x.Value))); SearchSymbols.ThrownExceptions.Subscribe(ex => { Debug.WriteLine(ex.Message); IsLoading = false; }); OpenPrices = ReactiveCommand.Create <Unit, Unit>(_ => { SelectedSymbols = Symbols.Where(s => s.Selected); return(Unit.Default); }); _symbols = this.WhenAnyObservable(x => x.SearchSymbols) .ToProperty(this, x => x.Symbols); }