public StockValueChartViewModel(IStockValueChartControlView view, IStockQueryService queryService, RealTimeStockItem realtimeStock)
        {
            _uiView       = view;
            _queryService = queryService;

            ChartDataCollection = new ObservableCollection <DataPoint>();
            StockValueContext   = realtimeStock;
        }
Example #2
0
 public StockShortageQueryController(
     IStockQueryService StockQueryService,
     IGlobalService globalService
     )
 {
     this._StockQueryService = StockQueryService;
     this._GlobalService     = globalService;
 }
        public void Setup()
        {
            _dbSessionService   = Substitute.For <IDbSessionService>();
            _walletQueryService = Substitute.For <IWalletQueryService>();
            _stockQueryService  = Substitute.For <IStockQueryService>();

            _sut = new SellStockService(_dbSessionService, _walletQueryService, _stockQueryService);
        }
 /// <summary>
 /// Show the chart windows from stock 
 /// </summary>
 public static void ShowStockChartDialog(IStockQueryService queryService, RealTimeStockItem stockItem)
 {
     StockMainChartPanel chartPanel = new StockMainChartPanel();
     StockMainChartViewModel chartMainViewModel = new StockMainChartViewModel(chartPanel, queryService, stockItem);
     chartPanel.DataContext = chartMainViewModel;
     chartPanel.Show();
     chartMainViewModel.Load();
 }
        /// <summary>
        /// Show the chart windows from stock
        /// </summary>
        public static void ShowStockChartDialog(IStockQueryService queryService, RealTimeStockItem stockItem)
        {
            StockMainChartPanel     chartPanel         = new StockMainChartPanel();
            StockMainChartViewModel chartMainViewModel = new StockMainChartViewModel(chartPanel, queryService, stockItem);

            chartPanel.DataContext = chartMainViewModel;
            chartPanel.Show();
            chartMainViewModel.Load();
        }
Example #6
0
 public StockController(IStockQueryService stockQueryService,
                        IStockUpdateService stockUpdateService,
                        IAuthenticationService authenticationService,
                        IMapper mapper)
 {
     _stockQueryService     = stockQueryService;
     _stockUpdateService    = stockUpdateService;
     _authenticationService = authenticationService;
     _mapper = mapper;
 }
Example #7
0
 public StockQueryController(
     IStockQueryService StockQueryService,
     IProductComplexService productComplexService,
     IGlobalService globalService
     )
 {
     this._StockQueryService     = StockQueryService;
     this._ProductComplexService = productComplexService;
     this._GlobalService         = globalService;
 }
Example #8
0
 public ProductController(IProductService productService,
                          IGlobalService globalService,
                          IProductImageComplexService image,
                          IStockQueryService stock
                          )
 {
     this._ProductService = productService;
     this._GlobalService  = globalService;
     this._ImageService   = image;
     this._Stock          = stock;
 }
        public MainViewModel(IStockQueryService queryService, ILocalStockService localStockService, IFavoriteStockService favoriteService)
        {
            _queryService               = queryService;
            _localStockService          = localStockService;
            _favoriteStockService       = favoriteService;
            StockListViewModel          = new StockListControlViewModel(queryService, favoriteService);
            AddStockCommand             = new DelegateCommand(AddStock_Click);
            DeleteStockCommand          = new DelegateCommand(DeleteStock_Click);
            AutoRefreshCheckedCommand   = new DelegateCommand(AutoRefresh_Checked);
            SafeModeCheckedCommand      = new DelegateCommand(SafeMode_Checked);
            UpdateAllStockCommand       = new DelegateCommand(UpdateAllStock_Click);
            StockItemDoubleClickCommand = new DelegateCommand <RealTimeStockItem>(StockItem_DoubleClick);

            TimeInterval  = 10;
            IsAutoRefresh = true;
#if DEBUG
            IsSafeMode = true;
#endif
            _localStockService.InitializeData();
        }
 public StockListControlViewModel(IStockQueryService stockQueryService, IFavoriteStockService favoriteService)
 {
     StockList             = new ObservableCollection <RealTimeStockItem>();
     _stockQueryService    = stockQueryService;
     _favoriteStockService = favoriteService;
 }
 public StockMainChartViewModel(IStockChartPanelView chartView, IStockQueryService queryService, RealTimeStockItem realtimeStock)
 {
     StockValueChart = new StockValueChartViewModel(chartView.StockValueChartView, queryService, realtimeStock);
     _realtimeStockModel = realtimeStock;
 }
Example #12
0
 /// <summary>
 /// Creates a StockImportService.
 /// </summary>
 /// <param name="entityQuerySource">EntityQuerySource to run queries against the persistent storage.</param>
 /// <param name="entityRepositoryFactory">EntityRepositoryFactory to make changes to the persistent storage.</param>
 /// <param name="stockQueryService">Service to query the current list of available stocks.</param>
 public StockImportService(IEntityQuerySource entityQuerySource, IEntityRepositoryFactory entityRepositoryFactory, IStockQueryService stockQueryService)
 {
     _entityQuerySource       = entityQuerySource;
     _entityRepositoryFactory = entityRepositoryFactory;
     _stockQueryService       = stockQueryService;
 }
 public SellStockService(IDbSessionService dbSessionService, IWalletQueryService walletQueryService, IStockQueryService stockQueryService)
 {
     _dbSessionService   = dbSessionService;
     _walletQueryService = walletQueryService;
     _stockQueryService  = stockQueryService;
 }
 public StockListControlViewModel(IStockQueryService stockQueryService, IFavoriteStockService favoriteService)
 {
     StockList = new ObservableCollection<RealTimeStockItem>();
     _stockQueryService = stockQueryService;
     _favoriteStockService = favoriteService;
 }
        public StockValueChartViewModel(IStockValueChartControlView view, IStockQueryService queryService, RealTimeStockItem realtimeStock)
        {
            _uiView = view;
            _queryService = queryService;

            ChartDataCollection = new ObservableCollection<DataPoint>();
            StockValueContext = realtimeStock;
        }
 public UserStocksController(UserDbContext userContext, IUserService userService, IStockQueryService stockService)
 {
     _userContext  = userContext;
     _userService  = userService;
     _stockService = stockService;
 }
Example #17
0
 public HoldingsRepository(FinanceDbContext context, IStockQueryService stockQuery)
 {
     context    = _context;
     stockQuery = _stockQuery;
 }
Example #18
0
 public StockMainChartViewModel(IStockChartPanelView chartView, IStockQueryService queryService, RealTimeStockItem realtimeStock)
 {
     StockValueChart     = new StockValueChartViewModel(chartView.StockValueChartView, queryService, realtimeStock);
     _realtimeStockModel = realtimeStock;
 }