Пример #1
0
        private static int OnParse(GlobalOptions globals, DicomDirectoryProcessorCliOptions parsedOptions)
        {
            var bootstrapper = new MicroserviceHostBootstrapper(() => new DicomDirectoryProcessorHost(globals, parsedOptions));
            int ret          = bootstrapper.Main();

            return(ret);
        }
Пример #2
0
        private static int OnParse(GlobalOptions globals, CohortPackagerCliOptions opts)
        {
            if (opts.ExtractionId != default)
            {
                return(RecreateReport(globals, opts));
            }

            var bootstrapper = new MicroserviceHostBootstrapper(() => new CohortPackagerHost(globals));
            int ret          = bootstrapper.Main();

            return(ret);
        }
Пример #3
0
        private static int OnParse(GlobalOptions globals, CliOptions opts)
        {
            //Use the auditor and request fullfilers specified in the yaml
            var bootstrapper = new MicroserviceHostBootstrapper(
                () => new CohortExtractorHost(
                    globals,
                    auditor: null,
                    fulfiller: null
                    )
                );

            int ret = bootstrapper.Main();

            return(ret);
        }
Пример #4
0
        private static int OnParse(GlobalOptions globals, object opts)
        {
            var parsedOptions = SmiCliInit.Verify <TriggerUpdatesCliOptions>(opts);

            ITriggerUpdatesSource source = parsedOptions switch
            {
                TriggerUpdatesFromMapperOptions o => new MapperSource(globals, o),
                TriggerUpdatesFromMongoOptions o => new MongoSource(globals, o),
                _ => throw new NotImplementedException($"No case for '{parsedOptions.GetType()}'")
            };

            var bootstrapper = new MicroserviceHostBootstrapper(() => new TriggerUpdatesHost(globals, source));
            int ret          = bootstrapper.Main();

            return(ret);
        }
    }
Пример #5
0
        private static int OnParse(GlobalOptions globals, DicomTagReaderCliOptions opts)
        {
            if (opts.File != null)
            {
                try
                {
                    var host = new DicomTagReaderHost(globals);
                    host.AccessionDirectoryMessageConsumer.RunSingleFile(opts.File);
                    return(0);
                }
                catch (Exception ex)
                {
                    LogManager.GetCurrentClassLogger().Error(ex);
                    return(1);
                }
            }

            var bootstrapper = new MicroserviceHostBootstrapper(() => new DicomTagReaderHost(globals));
            int ret          = bootstrapper.Main();

            return(ret);
        }