Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((269 + Level * 23 + BatchId.GetHashCode()) * 23 + CellId.GetHashCode());
     }
 }
Пример #2
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (BatchId != null)
         {
             hashCode = hashCode * 59 + BatchId.GetHashCode();
         }
         if (ExeScript != null)
         {
             hashCode = hashCode * 59 + ExeScript.GetHashCode();
         }
         if (EventType != null)
         {
             hashCode = hashCode * 59 + EventType.GetHashCode();
         }
         if (ActivityId != null)
         {
             hashCode = hashCode * 59 + ActivityId.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #3
0
        public void TestGetHashCode()
        {
            var maxLong  = Int64.MaxValue;
            var instance = new BatchId(maxLong);

            Assert.AreEqual(maxLong.GetHashCode(), instance.GetHashCode());
        }
Пример #4
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hash = BatchId != null?BatchId.GetHashCode() : 0;

                hash = (hash * 397) ^ (CellId != null ? CellId.GetHashCode() : 0);
                hash = (hash * 397) ^ Level;
                return(hash);
            }
        }
 public override int GetHashCode() {
   int hash = 1;
   if (Result != 0) hash ^= Result.GetHashCode();
   hash ^= template_.GetHashCode();
   hash ^= deletedTemplate_.GetHashCode();
   if (BatchId != 0UL) hash ^= BatchId.GetHashCode();
   if (PageOffset != 0) hash ^= PageOffset.GetHashCode();
   if (_unknownFields != null) {
     hash ^= _unknownFields.GetHashCode();
   }
   return hash;
 }
Пример #6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (BasisBatchId != 0L)
            {
                hash ^= BasisBatchId.GetHashCode();
            }
            if (BatchId != 0L)
            {
                hash ^= BatchId.GetHashCode();
            }
            if (PageOffset != 0)
            {
                hash ^= PageOffset.GetHashCode();
            }
            return(hash);
        }
Пример #7
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (BatchId.Length != 0)
        {
            hash ^= BatchId.GetHashCode();
        }
        if (Status != 0)
        {
            hash ^= Status.GetHashCode();
        }
        hash ^= invalidTransactions_.GetHashCode();
        if (_unknownFields != null)
        {
            hash ^= _unknownFields.GetHashCode();
        }
        return(hash);
    }
Пример #8
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Result != 0)
            {
                hash ^= Result.GetHashCode();
            }
            hash ^= template_.GetHashCode();
            hash ^= deletedTemplate_.GetHashCode();
            if (BatchId != 0UL)
            {
                hash ^= BatchId.GetHashCode();
            }
            if (PageOffset != 0)
            {
                hash ^= PageOffset.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (BasisBatchId != 0L)
            {
                hash ^= BasisBatchId.GetHashCode();
            }
            if (BatchId != 0L)
            {
                hash ^= BatchId.GetHashCode();
            }
            if (PageOffset != 0)
            {
                hash ^= PageOffset.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #10
0
 public override int GetHashCode()
 {
     //TODO: finish it, get hashes for all fields
     return(BatchId.GetHashCode());
 }