/// <summary> /// Compares two JSON PATCH results for equality. /// </summary> /// <param name="PatchResult">A JSON PATCH result to compare with.</param> /// <returns>True if both match; False otherwise.</returns> public Boolean Equals(PatchResult <T> PatchResult) => IsSuccess.Equals(PatchResult.IsSuccess) && PatchedData.Equals(PatchResult.PatchedData) && ((ErrorResponse.IsNullOrEmpty() && PatchResult.ErrorResponse.IsNullOrEmpty()) || (ErrorResponse.IsNotNullOrEmpty() && PatchResult.ErrorResponse.IsNotNullOrEmpty() && ErrorResponse.Equals(PatchResult.ErrorResponse)));
/// <summary> /// Return the hash code of this object. /// </summary> /// <returns>The hash code of this object.</returns> public override Int32 GetHashCode() { unchecked { return(IsSuccess.GetHashCode() * 5 ^ PatchedData.GetHashCode() * 3 ^ (ErrorResponse.IsNotNullOrEmpty() ? ErrorResponse.GetHashCode() : 0)); } }