/// <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 (Uuid != null) { hashCode = hashCode * 59 + Uuid.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (Value1 != null) { hashCode = hashCode * 59 + Value1.GetHashCode(); } if (Value2 != null) { hashCode = hashCode * 59 + Value2.GetHashCode(); } if (Value3 != null) { hashCode = hashCode * 59 + Value3.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Code; hashCode = (hashCode * 397) ^ (Value1 != null ? Value1.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Value2 != null ? Value2.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns> /// A hash code for the current <see cref="T:System.Object" />. /// </returns> /// <filterpriority>2</filterpriority> public override int GetHashCode() { unchecked { int result = (Column != null ? Column.GetHashCode() : 0); result = (result * 397) ^ (Value != null ? Value.GetHashCode() : 0); result = (result * 397) ^ (Value2 != null ? Value2.GetHashCode() : 0); result = (result * 397) ^ Comparison.GetHashCode(); result = (result * 397) ^ (NextInGroup != null ? NextInGroup.GetHashCode() : 0); result = (result * 397) ^ OrNextPredicate.GetHashCode(); result = (result * 397) ^ OrToPreviousGroup.GetHashCode(); return(result); } }
public override int GetHashCode() { unchecked { if (Operator.IsRangeOperator()) { return(Value.GetHashCode() + Value2.GetHashCode() + Operator.GetHashCode()); } if (Operator != QueryOperator.In && Operator != QueryOperator.NotIn) { return(Value.GetHashCode() + Operator.GetHashCode()); } var sum = 0; foreach (var value in InValues) { sum += value.GetHashCode(); } return(Operator.GetHashCode() + sum); } }
// this isn't exactly identical to the netcore algorithm, but good enough public override int GetHashCode() => (Value1?.GetHashCode() ?? 0) ^ (Value2?.GetHashCode() ?? 0 << 3);
public override int GetHashCode() => Value1.GetHashCode() ^ Value2.GetHashCode();
public override int GetHashCode() { return(Value1.GetHashCode() ^ Value2.GetHashCode() ^ Weight.GetHashCode()); }
public override int GetHashCode() { return(Value1.GetHashCode() + Value2.GetHashCode() + Value3.GetHashCode()); }
public override Int32 GetHashCode() => Timestamp.GetHashCode() ^ Value1.GetHashCode() ^ Value2.GetHashCode() ^ Value3.GetHashCode();