public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Enabled != null) { hashCode = hashCode * 59 + Enabled.GetHashCode(); } if (Target != null) { hashCode = hashCode * 59 + Target.GetHashCode(); } if (TargetArray != null) { hashCode = hashCode * 59 + TargetArray.GetHashCode(); } if (Operation != null) { hashCode = hashCode * 59 + Operation.GetHashCode(); } if (Value != null) { hashCode = hashCode * 59 + Value.GetHashCode(); } if (PreserveGaps != null) { hashCode = hashCode * 59 + PreserveGaps.GetHashCode(); } if (ValueCalendar != null) { hashCode = hashCode * 59 + ValueCalendar.GetHashCode(); } if (TargetCalendar != null) { hashCode = hashCode * 59 + TargetCalendar.GetHashCode(); } if (TargetSrc != null) { hashCode = hashCode * 59 + TargetSrc.GetHashCode(); } return(hashCode); } }
public bool Equals([AllowNull] Filter other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) && (Enabled == other.Enabled && Enabled != null && other.Enabled != null && Enabled.Equals(other.Enabled)) && (Target == other.Target && Target != null && other.Target != null && Target.Equals(other.Target)) && (Equals(TargetArray, other.TargetArray) || TargetArray != null && other.TargetArray != null && TargetArray.SequenceEqual(other.TargetArray)) && (Operation == other.Operation && Operation != null && other.Operation != null && Operation.Equals(other.Operation)) && (Value == other.Value && Value != null && other.Value != null && Value.Equals(other.Value)) && (PreserveGaps == other.PreserveGaps && PreserveGaps != null && other.PreserveGaps != null && PreserveGaps.Equals(other.PreserveGaps)) && (ValueCalendar == other.ValueCalendar && ValueCalendar != null && other.ValueCalendar != null && ValueCalendar.Equals(other.ValueCalendar)) && (TargetCalendar == other.TargetCalendar && TargetCalendar != null && other.TargetCalendar != null && TargetCalendar.Equals(other.TargetCalendar)) && (TargetSrc == other.TargetSrc && TargetSrc != null && other.TargetSrc != null && TargetSrc.Equals(other.TargetSrc))); }