/// <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 (Errors != null) { hashCode = hashCode * 59 + Errors.GetHashCode(); } if (IsCancellable != null) { hashCode = hashCode * 59 + IsCancellable.GetHashCode(); } if (StatusCategory != null) { hashCode = hashCode * 59 + StatusCategory.GetHashCode(); } if (StatusCode != null) { hashCode = hashCode * 59 + StatusCode.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (postedAt_ != null) { hash ^= PostedAt.GetHashCode(); } if (amount_ != null) { hash ^= Amount.GetHashCode(); } if (Narration.Length != 0) { hash ^= Narration.GetHashCode(); } if (PaymentType != 0) { hash ^= PaymentType.GetHashCode(); } if (IsCancellable != false) { hash ^= IsCancellable.GetHashCode(); } if (sale_ != null) { hash ^= Sale.GetHashCode(); } return(hash); }
/// <summary> /// Returns true if OrderStatusOutput instances are equal /// </summary> /// <param name="other">Instance of OrderStatusOutput to be compared</param> /// <returns>Boolean</returns> public bool Equals(OrderStatusOutput other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Errors == other.Errors || Errors != null && Errors.SequenceEqual(other.Errors) ) && ( IsCancellable == other.IsCancellable || IsCancellable != null && IsCancellable.Equals(other.IsCancellable) ) && ( StatusCategory == other.StatusCategory || StatusCategory != null && StatusCategory.Equals(other.StatusCategory) ) && ( StatusCode == other.StatusCode || StatusCode != null && StatusCode.Equals(other.StatusCode) )); }