/// <summary>
        ///
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public int CompareTo(WorldEntity other)
        {
            if (other == null)
            {
                return(1);
            }

            return(m_Serial.CompareTo(other.Serial));
        }
        public int CompareTo(DatabaseObject other)
        {
            if (other is DatabaseObject)
            {
                return(Serial.CompareTo(other.Serial));
            }

            return(-1);
        }
Beispiel #3
0
        public void CompareToTest()
        {
            Serial target      = new Serial(); // TODO: 初始化为适当的值
            object otherObject = null;         // TODO: 初始化为适当的值
            int    expected    = 0;            // TODO: 初始化为适当的值
            int    actual;

            actual = target.CompareTo(otherObject);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }
Beispiel #4
0
        public int Compare(object l, object r)
        {
            if ((l == null) && (r == null))
            {
                return(0);
            }
            if (l == null)
            {
                return(-1);
            }
            if (r == null)
            {
                return(1);
            }
            Serial serial1 = ((BuyItemState)l).MySerial;

            return(serial1.CompareTo(((BuyItemState)r).MySerial));
        }
Beispiel #5
0
        public int CompareTo(OtpErlangPid other)
        {
            if (other is null)
            {
                return(1);
            }
            int res = Creation.CompareTo(other.Creation);

            if (res == 0)
            {
                res = Serial.CompareTo(other.Serial);
            }
            if (res == 0)
            {
                res = Id.CompareTo(other.Id);
            }
            if (res == 0)
            {
                res = Node.CompareTo(other.Node);
            }
            return(res);
        }
Beispiel #6
0
 public int CompareTo(CCNode other)
 {
     return(Serial.CompareTo(other.Serial));
 }
 public void CompareToTest()
 {
     Serial target = new Serial(); // TODO: 初始化为适当的值
     object otherObject = null; // TODO: 初始化为适当的值
     int expected = 0; // TODO: 初始化为适当的值
     int actual;
     actual = target.CompareTo( otherObject );
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }