예제 #1
0
        public override int GetHashCode()
        {
            var hashCode = 926796717;

            hashCode = hashCode * -1521134295 + OrderId.GetHashCode();
            hashCode = hashCode * -1521134295 + ClientId.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ExecId);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Time);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(AcctNumber);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Exchange);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Side);

            hashCode = hashCode * -1521134295 + Shares.GetHashCode();
            hashCode = hashCode * -1521134295 + Price.GetHashCode();
            hashCode = hashCode * -1521134295 + PermId.GetHashCode();
            hashCode = hashCode * -1521134295 + Liquidation.GetHashCode();
            hashCode = hashCode * -1521134295 + CumQty.GetHashCode();
            hashCode = hashCode * -1521134295 + AvgPrice.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(OrderRef);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(EvRule);

            hashCode = hashCode * -1521134295 + EvMultiplier.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ModelCode);

            hashCode = hashCode * -1521134295 + EqualityComparer <Liquidity> .Default.GetHashCode(LastLiquidity);

            return(hashCode);
        }
예제 #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 (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 (AvgPrice != null)
         {
             hashCode = hashCode * 59 + AvgPrice.GetHashCode();
         }
         if (UnrealizedPl != null)
         {
             hashCode = hashCode * 59 + UnrealizedPl.GetHashCode();
         }
         return(hashCode);
     }
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (AvgPrice != 0D)
            {
                hash ^= AvgPrice.GetHashCode();
            }
            if (AvgVolume != 0D)
            {
                hash ^= AvgVolume.GetHashCode();
            }
            hash ^= priceUpdates_.GetHashCode();
            hash ^= volumeUpdates_.GetHashCode();
            return(hash);
        }
예제 #4
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 (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);
     }
 }