Exemplo n.º 1
0
        private void Handle(OneSecondElapsed @event)
        {
            // first let's generate fake rates to all instruments.
            GenerateFakeRates();

            // now lets publish those fake rates to our Rates Subscriber.
            var ratesSubscriber = Context.ActorSelection(m_protocol.GenerateTcpPath("EventsListener"));

            foreach (Instrument instrument in m_instrumentRepository.GetInstruments())
            {
                ratesSubscriber.Tell(new InstrumentUpdated(instrument.Name, instrument.Rate), Self);
            }
        }