/// <summary>
        /// Returns true if GroupMembership instances are equal
        /// </summary>
        /// <param name="other">Instance of GroupMembership to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GroupMembership other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Active == other.Active ||
                     Active.Equals(other.Active)
                 ) &&
                 (
                     Group == other.Group ||
                     Group != null &&
                     Group.Equals(other.Group)
                 ) &&
                 (
                     User == other.User ||
                     User != null &&
                     User.Equals(other.User)
                 ));
        }
Beispiel #2
0
        /// <summary>
        /// Returns true if UserDistrict instances are equal
        /// </summary>
        /// <param name="other">Instance of UserDistrict to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(UserDistrict other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     User == other.User ||
                     User.Equals(other.User)
                 ) &&
                 (
                     District == other.District ||
                     District.Equals(other.District)
                 ) &&
                 (
                     IsPrimary == other.IsPrimary ||
                     IsPrimary.Equals(other.IsPrimary)
                 ));
        }
Beispiel #3
0
        /// <summary>
        /// Returns true if UserFavourite instances are equal
        /// </summary>
        /// <param name="other">Instance of UserFavourite to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(UserFavourite other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Value == other.Value ||
                     Value != null &&
                     Value.Equals(other.Value)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     User == other.User ||
                     User != null &&
                     User.Equals(other.User)
                 ) &&
                 (
                     IsDefault == other.IsDefault ||
                     IsDefault != null &&
                     IsDefault.Equals(other.IsDefault)
                 ));
        }