Esempio n. 1
0
        public override int CompareTo(object obj)
        {
            if (!(obj is RemoteMemberBrowserInfo))
            {
                throw new ArgumentException("Object must be of type '" + GetType().FullName + "'.", "obj");
            }

            RemoteMemberBrowserInfo other = (RemoteMemberBrowserInfo)obj;

            return(Wrapped.CompareTo(other.Wrapped));
        }
Esempio n. 2
0
        public override bool Equals(object obj)
        {
            NetMemberBrowserInfo other = obj as NetMemberBrowserInfo;

            if (other == null)
            {
                return(false);
            }

            // The other object may be a RemoteMemberBrowserInfo or just a NetMemberBrowserInfo.

            RemoteMemberBrowserInfo otherRemote = other as RemoteMemberBrowserInfo;

            if (otherRemote == null)
            {
                return(object.Equals(Wrapped, other));
            }
            else
            {
                return(object.Equals(Wrapped, otherRemote.Wrapped));
            }
        }