/// <summary> /// Returns true if PagedResultInventoryOrderAssetResource instances are equal /// </summary> /// <param name="other">Instance of PagedResultInventoryOrderAssetResource to be compared</param> /// <returns>Boolean</returns> public bool Equals(PagedResultInventoryOrderAssetResource other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Results == other.Results || Results != null && Results.SequenceEqual(other.Results) ) && ( CurrentPage == other.CurrentPage || CurrentPage != null && CurrentPage.Equals(other.CurrentPage) ) && ( PageCount == other.PageCount || PageCount != null && PageCount.Equals(other.PageCount) ) && ( PageSize == other.PageSize || PageSize != null && PageSize.Equals(other.PageSize) ) && ( RowCount == other.RowCount || RowCount != null && RowCount.Equals(other.RowCount) ) && ( FirstRowOnPage == other.FirstRowOnPage || FirstRowOnPage != null && FirstRowOnPage.Equals(other.FirstRowOnPage) ) && ( LastRowOnPage == other.LastRowOnPage || LastRowOnPage != null && LastRowOnPage.Equals(other.LastRowOnPage) )); }
/// <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 (Results != null) { hashCode = hashCode * 59 + Results.GetHashCode(); } if (CurrentPage != null) { hashCode = hashCode * 59 + CurrentPage.GetHashCode(); } if (PageCount != null) { hashCode = hashCode * 59 + PageCount.GetHashCode(); } if (PageSize != null) { hashCode = hashCode * 59 + PageSize.GetHashCode(); } if (RowCount != null) { hashCode = hashCode * 59 + RowCount.GetHashCode(); } if (FirstRowOnPage != null) { hashCode = hashCode * 59 + FirstRowOnPage.GetHashCode(); } if (LastRowOnPage != null) { hashCode = hashCode * 59 + LastRowOnPage.GetHashCode(); } return(hashCode); } }