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