Example #1
0
        static void Main(string[] args)
        {
            var aggregatedRepository = new AggregatedRepository();

            var facebookProducer = new FacebookProducer();
            var twitterProducer  = new TwitterProducer();

            facebookProducer.SubscribeToUpdates(aggregatedRepository);
            twitterProducer.SubscribeToUpdates(aggregatedRepository);

            var client = new ClientConsumer();

            aggregatedRepository.SubscribeToAggregatedUpdates(client);

            Thread.Sleep(3000);
            aggregatedRepository.StopConsuming();

            Console.Read();
        }
        static void Main(string[] args)
        {
            var aggregatedRepository = new AggregatedRepository();

             var facebookProducer = new FacebookProducer();
             var twitterProducer  = new TwitterProducer();

             facebookProducer.SubscribeToUpdates(aggregatedRepository);
             twitterProducer.SubscribeToUpdates(aggregatedRepository);

             var client = new ClientConsumer();
             aggregatedRepository.SubscribeToAggregatedUpdates(client);

             Thread.Sleep(3000);
             aggregatedRepository.StopConsuming();

             Console.Read();
        }