Example #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;
 }
Example #2
0
 public ExtractJobInfo(
     Guid extractionJobIdentifier,
     DateTime jobSubmittedAt,
     [NotNull] string projectNumber,
     [NotNull] string extractionDirectory,
     [NotNull] string keyTag,
     uint keyValueCount,
     [CanBeNull] string extractionModality,
     ExtractJobStatus jobStatus,
     bool isIdentifiableExtraction,
     bool isNoFilterExtraction
     )
 {
     ExtractionJobIdentifier = (extractionJobIdentifier != default(Guid)) ? extractionJobIdentifier : throw new ArgumentNullException(nameof(extractionJobIdentifier));
     JobSubmittedAt          = (jobSubmittedAt != default(DateTime)) ? jobSubmittedAt : throw new ArgumentNullException(nameof(jobSubmittedAt));
     ProjectNumber           = (!string.IsNullOrWhiteSpace(projectNumber)) ? projectNumber : throw new ArgumentNullException(nameof(projectNumber));
     ExtractionDirectory     = (!string.IsNullOrWhiteSpace(extractionDirectory)) ? extractionDirectory : throw new ArgumentNullException(nameof(extractionDirectory));
     KeyTag        = (!string.IsNullOrWhiteSpace(keyTag)) ? keyTag : throw new ArgumentNullException(nameof(keyTag));
     KeyValueCount = (keyValueCount > 0) ? keyValueCount : throw new ArgumentNullException(nameof(keyValueCount));
     if (extractionModality != null)
     {
         ExtractionModality = (!string.IsNullOrWhiteSpace(extractionModality)) ? extractionModality : throw new ArgumentNullException(nameof(extractionModality));
     }
     JobStatus = (jobStatus != default(ExtractJobStatus)) ? jobStatus : throw new ArgumentException(nameof(jobStatus));
     IsIdentifiableExtraction = isIdentifiableExtraction;
     IsNoFilterExtraction     = isNoFilterExtraction;
 }