/// <summary> /// Constructor /// </summary> /// <param name="mediaServiceInstanceHealthService">Media services instance health service</param> /// <param name="jobVerificationRequestStorageService">Job verification requests storage service </param> /// <param name="jobOutputStatusStorageService">Job output status service to persist job output status after initial job submission</param> /// <param name="mediaServiceInstanceFactory">Factory to get Azure Media Service instance client</param> /// <param name="configService">Configuration container</param> public JobSchedulingService(IMediaServiceInstanceHealthService mediaServiceInstanceHealthService, IJobVerificationRequestStorageService jobVerificationRequestStorageService, IJobOutputStatusStorageService jobOutputStatusStorageService, IMediaServiceInstanceFactory mediaServiceInstanceFactory, IConfigService configService) { this.mediaServiceInstanceHealthService = mediaServiceInstanceHealthService ?? throw new ArgumentNullException(nameof(mediaServiceInstanceHealthService)); this.jobVerificationRequestStorageService = jobVerificationRequestStorageService ?? throw new ArgumentNullException(nameof(jobVerificationRequestStorageService)); this.jobOutputStatusStorageService = jobOutputStatusStorageService ?? throw new ArgumentNullException(nameof(jobOutputStatusStorageService)); this.mediaServiceInstanceFactory = mediaServiceInstanceFactory ?? throw new ArgumentNullException(nameof(mediaServiceInstanceFactory)); this.configService = configService ?? throw new ArgumentNullException(nameof(configService)); this.verificationDelay = new TimeSpan(0, this.configService.TimeDurationInMinutesToVerifyJobStatus, 0); }
/// <summary> /// Constructor /// </summary> /// <param name="mediaServiceInstanceHealthService">Service to load Azure Media Service instance health information</param> /// <param name="jobOutputStatusStorageService">Storage service for job output status records</param> /// <param name="provisioningRequestStorageService">Storage service to persist provisioning requests</param> /// <param name="jobVerificationRequestStorageService">Storage service to persist job verification requests</param> /// <param name="mediaServiceInstanceFactory">Factory to create Azure Media Services instance</param> /// <param name="configService">Configuration container</param> public JobVerificationService(IMediaServiceInstanceHealthService mediaServiceInstanceHealthService, IJobOutputStatusStorageService jobOutputStatusStorageService, IProvisioningRequestStorageService provisioningRequestStorageService, IJobVerificationRequestStorageService jobVerificationRequestStorageService, IMediaServiceInstanceFactory mediaServiceInstanceFactory, IConfigService configService) { this.mediaServiceInstanceHealthService = mediaServiceInstanceHealthService ?? throw new ArgumentNullException(nameof(mediaServiceInstanceHealthService)); this.jobOutputStatusStorageService = jobOutputStatusStorageService ?? throw new ArgumentNullException(nameof(jobOutputStatusStorageService)); this.provisioningRequestStorageService = provisioningRequestStorageService ?? throw new ArgumentNullException(nameof(provisioningRequestStorageService)); this.jobVerificationRequestStorageService = jobVerificationRequestStorageService ?? throw new ArgumentNullException(nameof(jobVerificationRequestStorageService)); this.mediaServiceInstanceFactory = mediaServiceInstanceFactory ?? throw new ArgumentNullException(nameof(mediaServiceInstanceFactory)); this.configService = configService ?? throw new ArgumentNullException(nameof(configService)); }