Esempio n. 1
0
 public MongoExtractJobDoc(
     Guid extractionJobIdentifier,
     [NotNull] MongoExtractionMessageHeaderDoc header,
     [NotNull] string projectNumber,
     ExtractJobStatus jobStatus,
     [NotNull] string extractionDirectory,
     DateTime jobSubmittedAt,
     [NotNull] string keyTag,
     uint keyCount,
     [CanBeNull] string extractionModality,
     bool isIdentifiableExtraction,
     bool isNoFilterExtraction,
     [CanBeNull] MongoFailedJobInfoDoc failedJobInfoDoc)
 {
     ExtractionJobIdentifier = (extractionJobIdentifier != default(Guid)) ? extractionJobIdentifier : throw new ArgumentException(nameof(extractionJobIdentifier));
     Header = header ?? throw new ArgumentNullException(nameof(header));
     ProjectNumber = (!string.IsNullOrWhiteSpace(projectNumber)) ? projectNumber : throw new ArgumentNullException(nameof(projectNumber));
     JobStatus = (jobStatus != ExtractJobStatus.Unknown) ? jobStatus : throw new ArgumentNullException(nameof(jobStatus));
     ExtractionDirectory = (!string.IsNullOrWhiteSpace(extractionDirectory)) ? extractionDirectory : throw new ArgumentNullException(nameof(extractionDirectory));
     JobSubmittedAt = (jobSubmittedAt != default(DateTime)) ? jobSubmittedAt : throw new ArgumentException(nameof(jobSubmittedAt));
     KeyTag = (!string.IsNullOrWhiteSpace(keyTag)) ? keyTag : throw new ArgumentNullException(nameof(keyTag));
     KeyCount = (keyCount > 0) ? keyCount : throw new ArgumentNullException(nameof(keyCount));
     if (extractionModality != null)
         ExtractionModality = (!string.IsNullOrWhiteSpace(extractionModality)) ? extractionModality : throw new ArgumentNullException(nameof(extractionModality));
     IsIdentifiableExtraction = isIdentifiableExtraction;
     IsNoFilterExtraction = isNoFilterExtraction;
     FailedJobInfoDoc = failedJobInfoDoc;
 }
Esempio n. 2
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 public MongoExtractJobDoc(MongoExtractJobDoc existing)
 {
     ExtractionJobIdentifier = existing.ExtractionJobIdentifier;
     Header = existing.Header;
     ProjectNumber = existing.ProjectNumber;
     JobStatus = existing.JobStatus;
     ExtractionDirectory = existing.ExtractionDirectory;
     JobSubmittedAt = existing.JobSubmittedAt;
     KeyTag = existing.KeyTag;
     KeyCount = existing.KeyCount;
     ExtractionModality = existing.ExtractionModality;
     IsIdentifiableExtraction = existing.IsIdentifiableExtraction;
     FailedJobInfoDoc = existing.FailedJobInfoDoc;
     IsNoFilterExtraction = existing.IsNoFilterExtraction;
 }