private void UnWatchStock(UnWatchStockMessage message)
 {
     if (!StockActors.ContainsKey(message.StockSymbol))
     {
         return;
     }
     ChartingActor.Tell(new RemoveChartSeriesMessage(message.StockSymbol));
     StockActors[message.StockSymbol].Tell(new UnsibscibeFromNewStockPriceMessage(ChartingActor));
 }
        private void UnWatchStock(UnWatchStockMessage a)
        {
            if (!_stockActors.ContainsKey(a.StockSymbol))
            {
                return;
            }

            _chartingActor.Tell(new RemoveChartSeriesMessage(a.StockSymbol));

            _stockActors[a.StockSymbol].Tell(new UnSubscribeToNewStockPriceMessage(_chartingActor));
        }
        private void UnWatchStock(UnWatchStockMessage message)
        {
            if (!_stockActors.ContainsKey(message.StockSymbol))
            {
                return;
            }

            _chartingActor.Post(new RemoveChartSeriesMessage(message.StockSymbol));

            _stockActors[message.StockSymbol]
            .Post(new UnSubscribeFromNewStockPricesMessage(_chartingActor));
        }
示例#4
0
        private void UnWatchStock(UnWatchStockMessage message)
        {
            bool childActorNeedsCreating = !_stockActors.ContainsKey(message.StockSymbol);

            if (childActorNeedsCreating)
            {
                IActorRef newChildActor =
                    Context.ActorOf(
                        Props.Create(() => new StockActor(message.StockSymbol)),
                        "StockActor_" + message.StockSymbol);
            }

            _chartingActor.Tell(new AddChartSeriesMessage(message.StockSymbol));

            _stockActors[message.StockSymbol].Tell(new SubscribeToNewStockPricesMessage(_chartingActor));
        }
示例#5
0
 private void UnWatchStock(UnWatchStockMessage message)
 {
     // TODO
     // complete method to un-subscribe
 }