Exemple #1
0
 public JobFacAwareDevelopmentModeService(
     TJobFacAwareProcess targetProcess,
     IHostApplicationLifetime hostApplicationLifetime,
     JobFacAwareProcessOptions jobFacServiceOptions)
     : base(hostApplicationLifetime)
 {
     process = targetProcess;
     options = jobFacServiceOptions;
 }
Exemple #2
0
        public JobFacAwareBackgroundService(
            TJobFacAwareProcess targetProcess,
            IHostApplicationLifetime hostApplicationLifetime,
            IJobFacServiceProvider jobFacServiceProvider,
            JobFacAwareProcessOptions jobFacServiceOptions)
            : base(hostApplicationLifetime)
        {
            if (jobFacServiceOptions.CommandLineArgs.Length == 0)
            {
                throw new ArgumentException("JobFac-aware apps require one GUID argument reflecting the job instance-key");
            }

            jobInstanceId = Formatting.FormattedInstanceKey(jobFacServiceOptions.CommandLineArgs[0]);
            if (!jobInstanceId.HasContent())
            {
                throw new ArgumentException("JobFac-aware apps require one GUID argument reflecting the job instance-key");
            }

            process        = targetProcess;
            jobFacProvider = jobFacServiceProvider;
            options        = jobFacServiceOptions;
        }