예제 #1
0
 public AppointmentActions(ILoggerAdapter <AppointmentActions> logger, IHackneyAppointmentsService appointmentsService, IHackneyAppointmentsServiceRequestBuilder requestBuilder, IHackneyRepairsService repairsService, IHackneyRepairsServiceRequestBuilder repairsServiceRequestBuilder)
 {
     _logger = logger;
     _appointmentsService = appointmentsService;
     _appointmentsServiceRequestBuilder = requestBuilder;
     _repairsService = repairsService;
     _repairsServiceRequestBuilder = repairsServiceRequestBuilder;
 }
        public AppointmentsController(ILoggerAdapter <AppointmentActions> loggerAdapter, IUhtRepository uhtRepository, IUhwRepository uhwRepository,
                                      ILoggerAdapter <HackneyAppointmentsServiceRequestBuilder> requestBuildLoggerAdapter, ILoggerAdapter <RepairsActions> repairsLoggerAdapter)
        {
            var serviceFactory = new HackneyAppointmentServiceFactory();

            _configBuilder       = new HackneyConfigurationBuilder((Hashtable)Environment.GetEnvironmentVariables(), ConfigurationManager.AppSettings);
            _appointmentsService = serviceFactory.build(loggerAdapter);
            var factory = new HackneyRepairsServiceFactory();

            _repairsService                  = factory.build(uhtRepository, uhwRepository, repairsLoggerAdapter);
            _loggerAdapter                   = loggerAdapter;
            _serviceRequestBuilder           = new HackneyAppointmentsServiceRequestBuilder(_configBuilder.getConfiguration(), requestBuildLoggerAdapter);
            _scheduleBookingRequestValidator = new ScheduleBookingRequestValidator(_repairsService);
            _repairsServiceRequestBuilder    = new HackneyRepairsServiceRequestBuilder(_configBuilder.getConfiguration());
        }