Ejemplo n.º 1
0
 public bool Equals(Order other)
 {
     return(string.Equals(OrderId, other.OrderId) && string.Equals(StockId, other.StockId) &&
            Side == other.Side &&
            OriginalQuantity.Equals(other.OriginalQuantity) &&
            Price == other.Price && Fills.ToImmutableHashSet().SetEquals(other.Fills));
 }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = OrderId.GetHashCode();
         hashCode = (hashCode * 397) ^ StockId.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Side;
         hashCode = (hashCode * 397) ^ OriginalQuantity.GetHashCode();
         hashCode = (hashCode * 397) ^ Price.GetHashCode();
         hashCode = (hashCode * 397) ^ Fills.GetHashCode();
         return(hashCode);
     }
 }