コード例 #1
0
        public PriceVolumeViewActor(string tickerSymbol, IActorRef priceActorGateway, IActorRef mediator)
        {
            _tickerSymbol      = tickerSymbol;
            _priceActorGateway = priceActorGateway;
            _priceTopic        = PriceTopicHelpers.PriceUpdateTopic(_tickerSymbol);
            _mediator          = mediator;
            _history           = new PriceHistory(_tickerSymbol, ImmutableSortedSet <IPriceUpdate> .Empty);

            WaitingForPriceAndVolume();
        }
コード例 #2
0
        public MatchAggregator(string tickerSymbol, IEventsByTagQuery eventsByTag, IActorRef mediator, ITimestamper timestamper)
        {
            TickerSymbol  = tickerSymbol;
            _priceTopic   = PriceTopicHelpers.PriceUpdateTopic(TickerSymbol);
            _volumeTopic  = PriceTopicHelpers.VolumeUpdateTopic(TickerSymbol);
            _eventsByTag  = eventsByTag;
            _mediator     = mediator;
            _timestamper  = timestamper;
            PersistenceId = EntityIdHelper.IdForPricing(tickerSymbol);

            Receives();
            Commands();
        }