public override int GetHashCode() { unchecked { var hashCode = DateValue.GetHashCode(); hashCode = (hashCode * 397) ^ (IgnoredProperty != null ? IgnoredProperty.GetHashCode() : 0); hashCode = (hashCode * 397) ^ IntegralValue; hashCode = (hashCode * 397) ^ (StringValue != null ? StringValue.GetHashCode() : 0); hashCode = (hashCode * 397) ^ NullableProperty.GetHashCode(); hashCode = (hashCode * 397) ^ (Component != null ? Component.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PrimitiveList != null ? PrimitiveList.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ComplexCollection != null ? ComplexCollection.GetHashCode() : 0); return(hashCode); } }
public bool Equals(ComplexTypeClass other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(DateValue.Equals(other.DateValue) && IntegralValue == other.IntegralValue && string.Equals(StringValue, other.StringValue) && NullableProperty == other.NullableProperty && Equals(Component, other.Component) && (PrimitiveList != null && PrimitiveList.SequenceEqual(other.PrimitiveList) || PrimitiveList == null && other.PrimitiveList == null) && (ComplexCollection != null && ComplexCollection.SequenceEqual(other.ComplexCollection) || ComplexCollection == null && other.ComplexCollection == null)); }