public IRecordProcessorManager GetExecuteRecord(string fileFullPath) { IRecordProcessorBase processor = recordProcessorFactory.GetRecordProcessor(fileFullPath); using (var subContainer = container.GetNestedContainer()) { subContainer.Inject <IRecordProcessorBase>(processor); return(subContainer.GetInstance <IRecordProcessorManager>()); } }
public RecordProcessorManager( IBoxLocations boxLocations, ILogger <IRecordProcessorManager> logger, IRecordProcessorBase processor, IStringHelper stringHelper) { this.stringHelper = stringHelper; this.logger = logger; this.processor = processor; this.TaskId = processor.GUID; var fileInfo = new FileInfo(processor.ConfigFile); //configs for revealing processing stage this.ConfigFile = fileInfo.FullName; this.RunningConfigFile = Path.Combine(boxLocations.RunningDir, fileInfo.Name); this.EndConfigFile = Path.Combine(boxLocations.EndDir, fileInfo.Name); this.OutputFile = Path.Combine(boxLocations.OutputDir, fileInfo.Name); }