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

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

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Title == other.Title ||
                     Title != null &&
                     Title.Equals(other.Title)
                 ) &&
                 (
                     Slug == other.Slug ||
                     Slug != null &&
                     Slug.Equals(other.Slug)
                 ));
        }
Example #3
0
        /// <summary>
        ///     Returns true if AttachmentRaw instances are equal
        /// </summary>
        /// <param name="other">Instance of AttachmentRaw to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(AttachmentRaw other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return
                ((
                     ContentType == other.ContentType ||
                     ContentType != null &&
                     ContentType.Equals(other.ContentType)
                     ) &&
                 (
                     Slug == other.Slug ||
                     Slug != null &&
                     Slug.Equals(other.Slug)
                 ) &&
                 (
                     UserAgent == other.UserAgent ||
                     UserAgent != null &&
                     UserAgent.Equals(other.UserAgent)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Rid == other.Rid ||
                     Rid != null &&
                     Rid.Equals(other.Rid)
                 ) &&
                 (
                     Ts == other.Ts ||
                     Ts != null &&
                     Ts.Equals(other.Ts)
                 ) &&
                 (
                     Self == other.Self ||
                     Self != null &&
                     Self.Equals(other.Self)
                 ) &&
                 (
                     Etag == other.Etag ||
                     Etag != null &&
                     Etag.Equals(other.Etag)
                 ) &&
                 (
                     Permissions == other.Permissions ||
                     Permissions != null &&
                     Permissions.Equals(other.Permissions)
                 ));
        }