コード例 #1
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = MessageGuid.GetHashCode();
         hashCode = (hashCode * 397) ^ ProducerProcessID;
         hashCode = (hashCode * 397) ^ (ProducerExecutableName != null ? ProducerExecutableName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ OriginalPublishTimestamp.GetHashCode();
         // NOTE(rkm 2020-03-04) GetHashCode for a struct[] uses reference equality, so instead we compute the hash
         //                      code using the string representation of the Parents array
         hashCode = (hashCode * 397) ^ (Parents != null ? string.Join(Splitter, Parents).GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = MessageGuid.GetHashCode();
         hashCode = (hashCode * 397) ^ ExtractionJobIdentifier.GetHashCode();
         hashCode = (hashCode * 397) ^ ProducerExecutableName.GetHashCode();
         hashCode = (hashCode * 397) ^ ProducerProcessID;
         hashCode = (hashCode * 397) ^ OriginalPublishTimestamp.GetHashCode();
         hashCode = (hashCode * 397) ^ (Parents != null ? Parents.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ReceivedAt.GetHashCode();
         return(hashCode);
     }
 }
コード例 #3
0
 public bool Equals(MongoExtractionMessageHeaderDoc other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(ExtractionJobIdentifier.Equals(other.ExtractionJobIdentifier) &&
            MessageGuid.Equals(other.MessageGuid) &&
            ProducerExecutableName == other.ProducerExecutableName &&
            ProducerProcessID == other.ProducerProcessID &&
            OriginalPublishTimestamp.Equals(other.OriginalPublishTimestamp) &&
            Parents == other.Parents &&
            ReceivedAt.Equals(other.ReceivedAt));
 }