/// <summary>
 /// Check if this instance is equal to another object that
 /// implements <see cref="IProfileMetaData"/>.
 /// </summary>
 /// <param name="other">
 /// The <see cref="IProfileMetaData"/> to check for equality
 /// </param>
 /// <returns>
 /// True if the two instances are equal.
 /// False otherwise
 /// </returns>
 public bool Equals(IProfileMetaData other)
 {
     if (other == null)
     {
         return(false);
     }
     return(ProfileId.Equals(other.ProfileId));
 }
Beispiel #2
0
 public bool Equals(DbStats?other)
 {
     return(other != null &&
            Id.Equals(other.Id) &&
            ProfileId.Equals(other.ProfileId) &&
            ChapterId.Equals(other.ChapterId) &&
            Completed == other.Completed &&
            Tips.SequenceEqual(other.Tips) &&
            Submits.SequenceEqual(other.Submits) &&
            Failures.SequenceEqual(other.Failures));
 }
Beispiel #3
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 = (VLClientProfile)obj;

            //reference types
            if (!Object.Equals(Name, other.Name))
            {
                return(false);
            }
            if (!Object.Equals(Comment, other.Comment))
            {
                return(false);
            }
            //value types
            if (!ProfileId.Equals(other.ProfileId))
            {
                return(false);
            }
            if (!MaxNumberOfUsers.Equals(other.MaxNumberOfUsers))
            {
                return(false);
            }
            if (!MaxNumberOfSurveys.Equals(other.MaxNumberOfSurveys))
            {
                return(false);
            }
            if (!MaxNumberOfLists.Equals(other.MaxNumberOfLists))
            {
                return(false);
            }
            if (!MaxNumberOfRecipientsPerList.Equals(other.MaxNumberOfRecipientsPerList))
            {
                return(false);
            }
            if (!MaxNumberOfRecipientsPerMessage.Equals(other.MaxNumberOfRecipientsPerMessage))
            {
                return(false);
            }
            if (!MaxNumberOfCollectorsPerSurvey.Equals(other.MaxNumberOfCollectorsPerSurvey))
            {
                return(false);
            }
            if (!MaxNumberOfEmailsPerDay.Equals(other.MaxNumberOfEmailsPerDay))
            {
                return(false);
            }
            if (!MaxNumberOfEmailsPerWeek.Equals(other.MaxNumberOfEmailsPerWeek))
            {
                return(false);
            }
            if (!MaxNumberOfEmailsPerMonth.Equals(other.MaxNumberOfEmailsPerMonth))
            {
                return(false);
            }
            if (!MaxNumberOfEmails.Equals(other.MaxNumberOfEmails))
            {
                return(false);
            }
            if (!AttributeFlags.Equals(other.AttributeFlags))
            {
                return(false);
            }

            return(true);
        }