Пример #1
0
        /// <summary>
        /// Returns true if Attachment instances are equal
        /// </summary>
        /// <param name="other">Instance of Attachment to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Attachment other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     FileName == other.FileName ||
                     FileName != null &&
                     FileName.Equals(other.FileName)
                 ) &&
                 (
                     FileContents == other.FileContents ||
                     FileContents != null &&
                     FileContents.Equals(other.FileContents)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     MimeType == other.MimeType ||
                     MimeType != null &&
                     MimeType.Equals(other.MimeType)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ));
        }