protected Job( string jobName, string queueName = "default", AttemptOptions attempt = null, ExecutionOptions execution = null ) { if (string.IsNullOrWhiteSpace(jobName)) { throw new ArgumentException("Value cannot be null or whitespace.", nameof(jobName)); } if (string.IsNullOrWhiteSpace(queueName)) { throw new ArgumentException("Value cannot be null or whitespace.", nameof(queueName)); } CreationTimestamp = DateTime.Now; JobName = jobName; QueueName = queueName; Attempt = attempt ?? AttemptOptions.Default; Execution = execution ?? ExecutionOptions.Default; }
public TJob SetExecution <TJob>(ExecutionOptions options) where TJob : Job { Execution = options ?? ExecutionOptions.Default; return((TJob)this); }