예제 #1
0
 public IncomingOrderController(
     ILogger logger,
     IMapper mapper,
     IncomingOrderService incomingOrderService)
 {
     _logger = logger;
     _mapper = mapper;
     _incomingOrderService = incomingOrderService;
 }
        /// <summary>
        /// Этот класс статический, поэтому нужно загрузить сервисы по вызову.
        /// </summary>
        public static void InitServices()
        {
            var mapper = AutoMapperConfigurationManager.CreateMapper();

            var _supplierInfoService = new SupplierInfoService(_logger, mapper);
            var _orderInfoService    = new OrderInfoService(_logger, mapper, _supplierInfoService);
            var _courierShiftService = new CourierShiftService(_logger, mapper);

            _courierShiftHistoryService = new CourierShiftHistoryService(_logger, mapper, _supplierInfoService, _orderInfoService, _courierShiftService);
            _incomingOrderService       = new IncomingOrderService(_logger, mapper, _supplierInfoService, _orderInfoService, _courierShiftHistoryService);
        }