Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            LearnerInfo peer = (LearnerInfo)obj;

            if (peer == null)
            {
                return(false);
            }
            if (Object.ReferenceEquals(peer, this))
            {
                return(true);
            }
            bool ret = false;

            ret = (Serverid == peer.Serverid);
            if (!ret)
            {
                return(ret);
            }
            ret = (ProtocolVersion == peer.ProtocolVersion);
            if (!ret)
            {
                return(ret);
            }
            return(ret);
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            LearnerInfo learnerInfo = (LearnerInfo)obj;

            if (learnerInfo == null)
            {
                return(false);
            }
            if (object.ReferenceEquals((object)learnerInfo, (object)this))
            {
                return(true);
            }
            bool flag1 = this.Serverid == learnerInfo.Serverid;

            if (!flag1)
            {
                return(flag1);
            }
            bool flag2 = this.ProtocolVersion == learnerInfo.ProtocolVersion;

            if (!flag2)
            {
                return(flag2);
            }
            return(flag2);
        }
Ejemplo n.º 3
0
        public override bool Equals(object obj)
        {
            LearnerInfo objA = (LearnerInfo)obj;

            if (objA == null)
            {
                return(false);
            }
            if (object.ReferenceEquals(objA, this))
            {
                return(true);
            }
            bool flag = false;

            flag = this.Serverid == objA.Serverid;
            if (flag)
            {
                flag = this.ProtocolVersion == objA.ProtocolVersion;
                if (!flag)
                {
                    return(flag);
                }
            }
            return(flag);
        }
Ejemplo n.º 4
0
        public int CompareTo(object obj)
        {
            LearnerInfo info = (LearnerInfo)obj;

            if (info == null)
            {
                throw new InvalidOperationException("Comparing different types of records.");
            }
            int num = 0;

            num = (this.Serverid == info.Serverid) ? 0 : ((this.Serverid < info.Serverid) ? -1 : 1);
            if (num == 0)
            {
                num = (this.ProtocolVersion == info.ProtocolVersion) ? 0 : ((this.ProtocolVersion < info.ProtocolVersion) ? -1 : 1);
                if (num != 0)
                {
                    return(num);
                }
            }
            return(num);
        }
Ejemplo n.º 5
0
        public int CompareTo(object obj)
        {
            LearnerInfo peer = (LearnerInfo)obj;

            if (peer == null)
            {
                throw new InvalidOperationException("Comparing different types of records.");
            }
            int ret = 0;

            ret = (Serverid == peer.Serverid)? 0 :((Serverid < peer.Serverid)?-1:1);
            if (ret != 0)
            {
                return(ret);
            }
            ret = (ProtocolVersion == peer.ProtocolVersion)? 0 :((ProtocolVersion < peer.ProtocolVersion)?-1:1);
            if (ret != 0)
            {
                return(ret);
            }
            return(ret);
        }
Ejemplo n.º 6
0
        public int CompareTo(object obj)
        {
            LearnerInfo learnerInfo = (LearnerInfo)obj;

            if (learnerInfo == null)
            {
                throw new InvalidOperationException("Comparing different types of records.");
            }
            int num1 = this.Serverid == learnerInfo.Serverid ? 0 : (this.Serverid < learnerInfo.Serverid ? -1 : 1);

            if (num1 != 0)
            {
                return(num1);
            }
            int num2 = this.ProtocolVersion == learnerInfo.ProtocolVersion ? 0 : (this.ProtocolVersion < learnerInfo.ProtocolVersion ? -1 : 1);

            if (num2 != 0)
            {
                return(num2);
            }
            return(num2);
        }