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

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Severity == other.Severity ||

                     Severity.Equals(other.Severity)
                 ) &&
                 (
                     Passed == other.Passed ||

                     Passed.Equals(other.Passed)
                 ) &&
                 (
                     Override == other.Override ||

                     Override.Equals(other.Override)
                 ) &&
                 (
                     ActualValue == other.ActualValue ||
                     ActualValue != null &&
                     ActualValue.Equals(other.ActualValue)
                 ) &&
                 (
                     ExpectedValue == other.ExpectedValue ||
                     ExpectedValue != null &&
                     ExpectedValue.Equals(other.ExpectedValue)
                 ) &&
                 (
                     Comparator == other.Comparator ||

                     Comparator.Equals(other.Comparator)
                 ) &&
                 (
                     Kpi == other.Kpi ||
                     Kpi != null &&
                     Kpi.Equals(other.Kpi)
                 ));
        }
Пример #2
0
 public bool Equals(XmlTranslationSet other)
 {
     if (other is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Override.Equals(other.Override) && Items.SequenceEqual(other.Items));
 }