コード例 #1
0
        public int Compare(StreamTrade 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);
            if (ret != 0)
            {
                return(ret);
            }
            ret = Buyer.CompareTo(other.Buyer);
            if (ret != 0)
            {
                return(ret);
            }
            ret = Seller.CompareTo(other.Seller);
            return(ret);
        }