コード例 #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);
     }
 }