Exemple #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Header.GetHashCode());
         hashCode = (hashCode * 397) ^ (DicomFilePath != null ? DicomFilePath.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (OutputFileName != null ? OutputFileName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (WasAnonymised.GetHashCode());
         hashCode = (hashCode * 397) ^ (IsIdentifiable.GetHashCode());
         hashCode = (hashCode * 397) ^ (ExtractedFileStatus.GetHashCode());
         hashCode = (hashCode * 397) ^ (StatusMessage.GetHashCode());
         return(hashCode);
     }
 }
Exemple #2
0
 public MongoFileStatusDoc(
     [NotNull] MongoExtractionMessageHeaderDoc header,
     [NotNull] string dicomFilePath,
     [CanBeNull] string outputFileName,
     bool wasAnonymised,
     bool isIdentifiable,
     ExtractedFileStatus extractedFileStatus,
     [CanBeNull] string statusMessage)
 {
     Header              = header ?? throw new ArgumentNullException(nameof(header));
     DicomFilePath       = dicomFilePath ?? throw new ArgumentNullException(nameof(dicomFilePath));
     OutputFileName      = outputFileName;
     WasAnonymised       = wasAnonymised;
     IsIdentifiable      = isIdentifiable;
     ExtractedFileStatus = (extractedFileStatus != ExtractedFileStatus.None) ? extractedFileStatus : throw new ArgumentException(nameof(extractedFileStatus));
     StatusMessage       = statusMessage;
     if (!IsIdentifiable && string.IsNullOrWhiteSpace(statusMessage))
     {
         throw new ArgumentNullException(nameof(statusMessage));
     }
 }