示例#1
0
 /// <summary>
 /// Creates an instance of the main worker service
 /// </summary>
 /// <param name="autoScaleProducerClient">Auto scale producer service client</param>
 /// <param name="jobProcessor">Job processor for handling the job if needed.</param>
 public HostService(IAutoScaleProducerClient autoScaleProducerClient, IJobProcessor jobProcessor)
 {
     this.autoScaleProducerClient = autoScaleProducerClient ?? throw new ArgumentNullException(nameof(autoScaleProducerClient));
     this.jobProcessor            = jobProcessor ?? throw new ArgumentNullException(nameof(jobProcessor));
     this.processCount            = 1; // 1 because of the host process
 }
示例#2
0
 /// <summary>
 /// Creates a new instance from the worker service
 /// </summary>
 /// <param name="autoScaleProducerClient">Auto sclae producer service client.</param>
 /// <param name="jobProcessor">The processor to handle the job if needed</param>
 public WorkerService(IAutoScaleProducerClient autoScaleProducerClient, IJobProcessor jobProcessor)
 {
     this.autoScaleProducerClient = autoScaleProducerClient ?? throw new ArgumentNullException(nameof(autoScaleProducerClient));
     this.jobProcessor            = jobProcessor ?? throw new ArgumentNullException(nameof(jobProcessor));
 }