/// <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 (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (IsCompatible != null) { hashCode = hashCode * 59 + IsCompatible.GetHashCode(); } if (CompatibilityLevel != null) { hashCode = hashCode * 59 + CompatibilityLevel.GetHashCode(); } if (Confidence != null) { hashCode = hashCode * 59 + Confidence.GetHashCode(); } if (ConfidenceDescription != null) { hashCode = hashCode * 59 + ConfidenceDescription.GetHashCode(); } return(hashCode); } }
/// <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 (Ingredient != null) { hashCode = hashCode * 59 + Ingredient.GetHashCode(); } if (IngredientDescription != null) { hashCode = hashCode * 59 + IngredientDescription.GetHashCode(); } if (DietLabel != null) { hashCode = hashCode * 59 + DietLabel.GetHashCode(); } if (IsCompatible != null) { hashCode = hashCode * 59 + IsCompatible.GetHashCode(); } if (CompatibilityLevel != null) { hashCode = hashCode * 59 + CompatibilityLevel.GetHashCode(); } if (CompatibilityDescription != null) { hashCode = hashCode * 59 + CompatibilityDescription.GetHashCode(); } if (IsAllergen != null) { hashCode = hashCode * 59 + IsAllergen.GetHashCode(); } return(hashCode); } }