public override int GetHashCode() { unchecked { var hashCode = ConversionFaktor.GetHashCode(); hashCode = (hashCode * 397) ^ FileName?.GetHashCode() ?? 1; hashCode = (hashCode * 397) ^ Guid?.GetHashCode() ?? 1; hashCode = (hashCode * 397) ^ Name?.GetHashCode() ?? 1; hashCode = (hashCode * 397) ^ ShowInCharts.GetHashCode(); hashCode = (hashCode * 397) ^ UnitOfPower?.GetHashCode() ?? 1; hashCode = (hashCode * 397) ^ UnitOfSum?.GetHashCode() ?? 1; return(hashCode); } }
// needed for xml deserialize public bool Equals(LoadTypeInformation other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(ConversionFaktor.Equals(other.ConversionFaktor) && FileName == other.FileName && Guid == other.Guid && Name == other.Name && ShowInCharts == other.ShowInCharts && UnitOfPower == other.UnitOfPower && UnitOfSum == other.UnitOfSum); }