public override ExitCodeType Attach(IDataLoadJob job, GracefulCancellationToken token)
        {
            Job = job;

            //if we have an explicit payload to run instead (this is how you inject explicit files/archives/directories to be loaded without touching the disk
            if (job.Payload != null)
            {
                var useCase = new AutoRoutingAttacherPipelineUseCase(this, (IDicomWorklist)job.Payload);
                var engine  = useCase.GetEngine(LoadPipeline, Job);
                engine.ExecutePipeline(token);
            }
            else
            {
                if (ListPattern == null)
                {
                    job.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning, "ListPattern was null and no Payload alternative was set, skipping component"));
                    return(ExitCodeType.Success);
                }

                //no explicit injected payload, so use the ForLoading directory to generate the list of dicom/zip files to process
                foreach (var filesToLoad in job.LoadDirectory.ForLoading.GetFiles(ListPattern))
                {
                    var useCase = new AutoRoutingAttacherPipelineUseCase(this, new FlatFileToLoadDicomFileWorklist(new FlatFileToLoad(filesToLoad)));
                    var engine  = useCase.GetEngine(LoadPipeline, job);
                    engine.ExecutePipeline(token);
                }
            }

            var unmatchedColumns = string.Join("," + Environment.NewLine, _columnNamesRoutedSuccesfully.Where(kvp => kvp.Value == false).Select(k => k.Key));

            if (!string.IsNullOrWhiteSpace(unmatchedColumns))
            {
                //for each column see in an input table that was not succesfully routed somewhere
                job.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning, "Ignored input columns:" + unmatchedColumns));
            }


            return(ExitCodeType.Success);
        }
 public IPipelineUseCase GetDesignTimePipelineUseCase(RequiredPropertyInfo property)
 {
     return(AutoRoutingAttacherPipelineUseCase.GetDesignTimeUseCase(this));
 }