Пример #1
0
        /// <summary>
        ///     Returns true if DatabaseCollection instances are equal
        /// </summary>
        /// <param name="other">Instance of DatabaseCollection to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DatabaseCollection other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Rid == other.Rid ||
                     Rid != null &&
                     Rid.Equals(other.Rid)
                 ) &&
                 (
                     Databases == other.Databases ||
                     Databases != null &&
                     Databases.SequenceEqual(other.Databases)
                 ) &&
                 (
                     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)
                 ) &&
                 (
                     Colls == other.Colls ||
                     Colls != null &&
                     Colls.Equals(other.Colls)
                 ) &&
                 (
                     Users == other.Users ||
                     Users != null &&
                     Users.Equals(other.Users)
                 ));
        }