public int Compare(StreamOrder other) { int ret = 0; ret = Id.CompareTo(other.Id); if (ret != 0) { return(ret); } ret = PortfolioId.CompareTo(other.PortfolioId); if (ret != 0) { return(ret); } ret = InstrumentId.CompareTo(other.InstrumentId); if (ret != 0) { return(ret); } ret = (Bid != other.Bid ? Bid ? 1 : -1 : 0); if (ret != 0) { return(ret); } ret = (Price != other.Price ? Price > other.Price ? 1 : -1 : 0); if (ret != 0) { return(ret); } ret = (Volume != other.Volume ? Volume > other.Volume ? 1 : -1 : 0); return(ret); }
} // this is very vague by intention - we won't execute any roles public int Compare(StreamRule other) { int ret = 0; ret = Id.CompareTo(other.Id); if (ret != 0) { return(ret); } ret = PortfolioId.CompareTo(other.PortfolioId); if (ret != 0) { return(ret); } ret = Expression.CompareTo(other.Expression); return(ret); }