/// <summary> /// Returns true if Error instances are equal /// </summary> /// <param name="input">Instance of Error to be compared</param> /// <returns>Boolean</returns> public bool Equals(Error input) { if (input == null) { return(false); } return (( ResultCode == input.ResultCode || ResultCode.Equals(input.ResultCode) ) && ( ExtResultStatus == input.ExtResultStatus || (ExtResultStatus != null && ExtResultStatus.Equals(input.ExtResultStatus)) ) && ( ExtResultMessage == input.ExtResultMessage || (ExtResultMessage != null && ExtResultMessage.Equals(input.ExtResultMessage)) ) && ( InternalErrorId == input.InternalErrorId || (InternalErrorId != null && InternalErrorId.Equals(input.InternalErrorId)) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; hashCode = hashCode * 59 + ResultCode.GetHashCode(); if (ExtResultStatus != null) { hashCode = hashCode * 59 + ExtResultStatus.GetHashCode(); } if (ExtResultMessage != null) { hashCode = hashCode * 59 + ExtResultMessage.GetHashCode(); } if (InternalErrorId != null) { hashCode = hashCode * 59 + InternalErrorId.GetHashCode(); } return(hashCode); } }