Example #1
0
        /// <summary>
        /// Determines whether the specified Object is equal to the current Object.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }


            var other = (VLClientList)obj;

            //reference types
            if (!Object.Equals(Name, other.Name))
            {
                return(false);
            }
            //value types
            if (!Client.Equals(other.Client))
            {
                return(false);
            }
            if (!ListId.Equals(other.ListId))
            {
                return(false);
            }
            if (!TotalContacts.Equals(other.TotalContacts))
            {
                return(false);
            }

            return(true);
        }
Example #2
0
        /// <summary>
        /// Determines whether the specified Object is equal to the current Object.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }


            var other = (VLContact)obj;

            //reference types
            if (!Object.Equals(Organization, other.Organization))
            {
                return(false);
            }
            if (!Object.Equals(Title, other.Title))
            {
                return(false);
            }
            if (!Object.Equals(Department, other.Department))
            {
                return(false);
            }
            if (!Object.Equals(FirstName, other.FirstName))
            {
                return(false);
            }
            if (!Object.Equals(LastName, other.LastName))
            {
                return(false);
            }
            if (!Object.Equals(Email, other.Email))
            {
                return(false);
            }
            if (!Object.Equals(Comment, other.Comment))
            {
                return(false);
            }
            //value types
            if (!ClientId.Equals(other.ClientId))
            {
                return(false);
            }
            if (!ListId.Equals(other.ListId))
            {
                return(false);
            }
            if (!ContactId.Equals(other.ContactId))
            {
                return(false);
            }
            if (!AttributeFlags.Equals(other.AttributeFlags))
            {
                return(false);
            }

            return(true);
        }