Пример #1
0
        public AssetSummaryViewModel(AssetStore assetStore)
        {
            _assetStore           = assetStore;
            AssetListingViewModel = new AssetListingViewModel(assetStore, assets => assets.Take(3));

            _assetStore.StateChanged += AssetStore_StateChanged;
        }
        public AssetSummaryViewModel(AssetStore assetStore)
        {
            this.assetStore       = assetStore;
            AssetListingViewModel = new AssetListingViewModel(assetStore, a => a.Take(3));

            assetStore.StateChanged += AssetStore_StateChanged;
        }
Пример #3
0
 public SellViewModel(AssetStore assetStore, IStockPriceService stockPriceService, ISellStockService sellStockService, IAccountStore accountStore)
 {
     AssetListingViewModel  = new AssetListingViewModel(assetStore);
     SearchSymbolCommand    = new SearchSymbolCommand(this, stockPriceService);
     SellStockCommand       = new SellStockCommand(this, sellStockService, accountStore);
     ErrorMessageViewModel  = new MessageViewModel();
     StatusMessageViewModel = new MessageViewModel();
 }
Пример #4
0
 public PortfolioViewModel(AssetStore assetStore)
 {
     AssetListingViewModel = new AssetListingViewModel(assetStore);
 }