Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((269 + Level * 23 + BatchId.GetHashCode()) * 23 + CellId.GetHashCode());
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
        public void TestGetHashCode()
        {
            var maxLong  = Int64.MaxValue;
            var instance = new BatchId(maxLong);

            Assert.AreEqual(maxLong.GetHashCode(), instance.GetHashCode());
        }
Exemplo n.º 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;
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
    }
Exemplo n.º 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);
        }
Exemplo n.º 10
0
 public override int GetHashCode()
 {
     //TODO: finish it, get hashes for all fields
     return(BatchId.GetHashCode());
 }