public StockWatcher(IStockUpdater updater, IProducer <StockMarketData> mdProducer, string name, double initValue)
 {
     _timer = new Timer(new TimerCallback(HandleTick), null, 500, 500);
     _watch = new Stopwatch();
     _watch.Start();
     _updater    = updater;
     _mdProducer = mdProducer;
     _current    = new StockMarketData(name, initValue, initValue, initValue);
 }
Exemplo n.º 2
0
        public StockView()
        {
            InitializeComponent();

            //define dependencies
            definedStockContainer           = StockContainerCreator.GetDefinedStockContainer();
            definedStockContainer.OnAdd    += onStockAdded;
            definedStockContainer.OnRemove += onStockRemoved;

            //fetch saved Stocks

            stockUpdater         = StockUpdaterFactory.Create();
            stockUpdater.Notify += OnNotified;

            //_stockStore = StockStoreFactory.GetStockStore();
            LoadFrequency();
        }
Exemplo n.º 3
0
 public void Init()
 {
     DependencyResolver.Setup();
     sut = DependencyResolver.Get <IStockUpdater>();
 }
 public PaymentCompleteHandler(IEmailService emailService, IOrderService orderService, IStockUpdater stockUpdater)
 {
     _emailService = emailService;
     _orderService = orderService;
     _stockUpdater = stockUpdater;
 }
Exemplo n.º 5
0
 public PaymentCompleteHandler(IEmailService emailService, IOrderService orderService, IStockUpdater stockUpdater)
 {
     _emailService = emailService;
     _orderService = orderService;
     _stockUpdater = stockUpdater;
 }