Esempio n. 1
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);
     }
 }
Esempio 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 (Class != null)
         {
             hashCode = hashCode * 59 + Class.GetHashCode();
         }
         if (Number != null)
         {
             hashCode = hashCode * 59 + Number.GetHashCode();
         }
         if (Url != null)
         {
             hashCode = hashCode * 59 + Url.GetHashCode();
         }
         if (Actions != null)
         {
             hashCode = hashCode * 59 + Actions.GetHashCode();
         }
         if (Building != null)
         {
             hashCode = hashCode * 59 + Building.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (DisplayName != null)
         {
             hashCode = hashCode * 59 + DisplayName.GetHashCode();
         }
         if (Duration != null)
         {
             hashCode = hashCode * 59 + Duration.GetHashCode();
         }
         if (EstimatedDuration != null)
         {
             hashCode = hashCode * 59 + EstimatedDuration.GetHashCode();
         }
         if (Executor != null)
         {
             hashCode = hashCode * 59 + Executor.GetHashCode();
         }
         if (FullDisplayName != null)
         {
             hashCode = hashCode * 59 + FullDisplayName.GetHashCode();
         }
         if (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (KeepLog != null)
         {
             hashCode = hashCode * 59 + KeepLog.GetHashCode();
         }
         if (QueueId != null)
         {
             hashCode = hashCode * 59 + QueueId.GetHashCode();
         }
         if (Result != null)
         {
             hashCode = hashCode * 59 + Result.GetHashCode();
         }
         if (Timestamp != null)
         {
             hashCode = hashCode * 59 + Timestamp.GetHashCode();
         }
         if (BuiltOn != null)
         {
             hashCode = hashCode * 59 + BuiltOn.GetHashCode();
         }
         if (ChangeSet != null)
         {
             hashCode = hashCode * 59 + ChangeSet.GetHashCode();
         }
         return(hashCode);
     }
 }