コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((ParentType != null ? ParentType.GetHashCode() : 0) * 397) ^ (ExtenderType != null ? ExtenderType.GetHashCode() : 0));
     }
 }
コード例 #2
0
        public override int GetHashCode()
        {
            int hashCode = ParentType.GetHashCode();

            hashCode = (hashCode * 397) ^ (ParentId.GetHashCode());
            return(hashCode);
        }
コード例 #3
0
 public override int GetHashCode()
 {
     return
         (ParentType.GetHashCode() ^
          ChildType.GetHashCode() ^
          Name.GetHashCode());
 }
コード例 #4
0
        public override int GetHashCode()
        {
            int hash = base.GetHashCode();

            hash = hash * 31 + (ParentId == null ? 0 : ParentId.GetHashCode());
            hash = hash * 31 + ParentType.GetHashCode();
            return(hash);
        }
コード例 #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((EventTypeInfo != null ? EventTypeInfo.GetHashCode() : 0) * 397) ^
                (ParentType != null ? ParentType.GetHashCode() : 0));
     }
 }
コード例 #6
0
 public override Int32 GetHashCode()
 {
     if (NameStr == null)
     {
         return(ParentType.GetHashCode() ^ NameInt.GetHashCode());
     }
     return(ParentType.GetHashCode() ^ NameStr.GetHashCode() ^ NameInt.GetHashCode());
 }
コード例 #7
0
ファイル: Order.cs プロジェクト: scscgit/XchangeCrypt-Backend
 /// <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 (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Instrument != null)
         {
             hashCode = hashCode * 59 + Instrument.GetHashCode();
         }
         if (Qty != null)
         {
             hashCode = hashCode * 59 + Qty.GetHashCode();
         }
         if (Side != null)
         {
             hashCode = hashCode * 59 + Side.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (FilledQty != null)
         {
             hashCode = hashCode * 59 + FilledQty.GetHashCode();
         }
         if (AvgPrice != null)
         {
             hashCode = hashCode * 59 + AvgPrice.GetHashCode();
         }
         if (LimitPrice != null)
         {
             hashCode = hashCode * 59 + LimitPrice.GetHashCode();
         }
         if (StopPrice != null)
         {
             hashCode = hashCode * 59 + StopPrice.GetHashCode();
         }
         if (ParentId != null)
         {
             hashCode = hashCode * 59 + ParentId.GetHashCode();
         }
         if (ParentType != null)
         {
             hashCode = hashCode * 59 + ParentType.GetHashCode();
         }
         if (Duration != null)
         {
             hashCode = hashCode * 59 + Duration.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         return(hashCode);
     }
 }