/// <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 (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (TypeRefinment != null) { hashCode = hashCode * 59 + TypeRefinment.GetHashCode(); } if (Invnum != null) { hashCode = hashCode * 59 + Invnum.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if MeasurngInstrument instances are equal /// </summary> /// <param name="other">Instance of MeasurngInstrument to be compared</param> /// <returns>Boolean</returns> public bool Equals(MeasurngInstrument other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( TypeRefinment == other.TypeRefinment || TypeRefinment != null && TypeRefinment.Equals(other.TypeRefinment) ) && ( Invnum == other.Invnum || Invnum != null && Invnum.Equals(other.Invnum) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) )); }