public Import(IOrderImportService importService, IOrderWriteService writeOrderService, IAppSettings settings) { if (importService == null) { //todo: logging throw new ArgumentNullException(nameof(IOrderImportService)); } if (writeOrderService == null) { //todo: logging throw new ArgumentNullException(nameof(IOrderWriteService)); } if (settings == null) { //todo: logging throw new ArgumentNullException(nameof(settings)); } _settings = settings; this._importService = importService; this._writeOrderService = writeOrderService; this.Inputdir = _settings.SftpFolderLocation + _settings.GetAppSettingValue("Input Directory"); this.InprocessDir = _settings.SftpFolderLocation + _settings.GetAppSettingValue("InProcess Directory"); this.ErrorDir = _settings.SftpFolderLocation + _settings.GetAppSettingValue("Error Directory"); this.SuccessDir = _settings.SftpFolderLocation + _settings.GetAppSettingValue("Success Directory"); }
public ImportOrderHandler(IOrderFileService orderFileService, IOrderImportService orderImportService, IOrderFileStorageService fileStorageService, IOrderFileParser orderFileParser, IRepository <ImportResult> importResultRepo) { _orderFileService = orderFileService; _orderImportService = orderImportService; _fileStorageService = fileStorageService; _orderFileParser = orderFileParser; _importResultRepo = importResultRepo; }
public OrderImportController(IOrderImportService orderExportService) => _orderExportService = orderExportService;