コード例 #1
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (Input != null)
                {
                    hashCode = hashCode * 59 + Input.GetHashCode();
                }

                hashCode = hashCode * 59 + Header.GetHashCode();
                if (Alternate != null)
                {
                    hashCode = hashCode * 59 + Alternate.GetHashCode();
                }
                if (Attributes != null)
                {
                    hashCode = hashCode * 59 + Attributes.GetHashCode();
                }
                if (Omit != null)
                {
                    hashCode = hashCode * 59 + Omit.GetHashCode();
                }
                if (Order != null)
                {
                    hashCode = hashCode * 59 + Order.GetHashCode();
                }
                return(hashCode);
            }
        }
コード例 #2
0
        /// <summary>
        /// Returns true if InputJsonConversionCSV instances are equal
        /// </summary>
        /// <param name="other">Instance of InputJsonConversionCSV to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InputJsonConversionCSV other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Input == other.Input ||
                     Input != null &&
                     Input.Equals(other.Input)
                     ) &&
                 (
                     Header == other.Header ||

                     Header.Equals(other.Header)
                 ) &&
                 (
                     Omit == other.Omit ||
                     Omit != null &&
                     Omit.Equals(other.Omit)
                 ) &&
                 (
                     Order == other.Order ||
                     Order != null &&
                     Order.Equals(other.Order)
                 ));
        }
コード例 #3
0
        /// <summary>
        /// Returns true if InputJsonConversionHTML instances are equal
        /// </summary>
        /// <param name="other">Instance of InputJsonConversionHTML to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InputJsonConversionHTML other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Input == other.Input ||
                     Input != null &&
                     Input.Equals(other.Input)
                     ) &&
                 (
                     Header == other.Header ||

                     Header.Equals(other.Header)
                 ) &&
                 (
                     Alternate == other.Alternate ||
                     Alternate != null &&
                     Alternate.Equals(other.Alternate)
                 ) &&
                 (
                     Attributes == other.Attributes ||
                     Attributes != null &&
                     Attributes.Equals(other.Attributes)
                 ) &&
                 (
                     Omit == other.Omit ||
                     Omit != null &&
                     Omit.Equals(other.Omit)
                 ) &&
                 (
                     Order == other.Order ||
                     Order != null &&
                     Order.Equals(other.Order)
                 ));
        }