public CarQuoteService(ICarQuoteRequestWriter carQuoteRequestWriter,
                         ICarQuoteResponseWriter carQuoteResponseWriter,
                         ICarQuoteResponseReader carQuoteResponseReader,
                         IRestFactory restFactory)
 {
     _carQuoteResponseReader = carQuoteResponseReader;
     _carQuoteResponseWriter = carQuoteResponseWriter;
     _restFactory = restFactory;
     _carQuoteRequestWriter = carQuoteRequestWriter;
 }
        public QuoteCoordinatorActor(Entities context)
        {
            _carQuoteResponseWriter = new CarQuoteResponseWriter(context);
            _carQuoteRequestWriter = new CarQuoteRequestWriter(context);

            _serviceTimer = new Timer();
            _serviceTimer.Elapsed += ServiceTimerElapsed;
            _serviceTimer.Interval = Timeout * 1000; // 10 second interval (in milliseconds)

            // create a child actor for each insurance service
            _quoteServicesPool =
                Context.ActorOf(
                    Props.Create(() => new QuoteServiceActor())
                         .WithRouter(new RoundRobinPool(_numInsurers)), "ServiceInterrogator");

            MessageReceiver();
        }