public BuyViewModel(IStockService stockService, IBuyStockService buyStockService) { _stockService = stockService; _buyStockService = buyStockService; SearchSymbolCommand = new RelayCommand<string>((s) => SearchSymbolCmd(s)); BuyStockCommand = new RelayCommand(BuyStockCmd); }
public BuyStockCommand(BuyViewModel buyViewModel, IBuyStockService buyStockService, IAccountStore accountStore) { _buyViewModel = buyViewModel; _buyStockService = buyStockService; _accountStore = accountStore; _buyViewModel.PropertyChanged += BuyViewModel_PropertyChanged; }
public BuyViewModel(IStockPriceService stockPriceService, IBuyStockService buyStockService, IAccountStore accountStore) { SearchSymbolCommand = new SearchSymbolCommand(this, stockPriceService); BuyStockCommand = new BuyStockCommand(this, buyStockService, accountStore); ErrorMessageViewModel = new MessageViewModel(); StatusMessageViewModel = new MessageViewModel(); }
protected override async void OnStartup(StartupEventArgs e) { IServiceProvider serviceProvider = CreateServiceProvider(); IBuyStockService buyStockService = serviceProvider.GetRequiredService <IBuyStockService>(); Window window = new MainWindow(); window.DataContext = serviceProvider.GetRequiredService <MainViewModel>(); window.Show(); using (IServiceScope scope = serviceProvider.CreateScope()) { scope.ServiceProvider.GetRequiredService <MainViewModel>(); } base.OnStartup(e); }
public BuyStockCommand(BuyViewModel buyViewModel, IBuyStockService buyStockService) { _buyViewModel = buyViewModel; _buyStockService = buyStockService; }
public BuyViewModel(IStockPriceService stockPriceService, IBuyStockService buyStockService) { SearchSymbolCommand = new SearchSymbolCommand(this, stockPriceService); BuyStockCommand = new BuyStockCommand(this, buyStockService); }
public BuyStockCommand(BuyViewModel buyViewModel, IBuyStockService buyStockService, IAccountStore accountStore) { _buyViewModel = buyViewModel; _buyStockService = buyStockService; _accountStore = accountStore; }
public TransactionController(IAuthorizeUserService authorizeUserService, IBuyStockService buyStockService, ISellStockService sellStockService) { _authorizeUserService = authorizeUserService; _buyStockService = buyStockService; _sellStockService = sellStockService; }
public BuyViewModelFactory(IStockPriceService stockPriceService, IBuyStockService buyStockService) { this.stockPriceService = stockPriceService; this.buyStockService = buyStockService; }