Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if XPaginationHeader instances are equal
        /// </summary>
        /// <param name="other">Instance of XPaginationHeader to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(XPaginationHeader other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CurrentPage == other.CurrentPage ||

                     CurrentPage.Equals(other.CurrentPage)
                     ) &&
                 (
                     PageSize == other.PageSize ||

                     PageSize.Equals(other.PageSize)
                 ) &&
                 (
                     TotalCount == other.TotalCount ||

                     TotalCount.Equals(other.TotalCount)
                 ) &&
                 (
                     TotalPages == other.TotalPages ||

                     TotalPages.Equals(other.TotalPages)
                 ) &&
                 (
                     PreviousPageInputParameters == other.PreviousPageInputParameters ||
                     PreviousPageInputParameters != null &&
                     PreviousPageInputParameters.Equals(other.PreviousPageInputParameters)
                 ) &&
                 (
                     NextPageInputParameters == other.NextPageInputParameters ||
                     NextPageInputParameters != null &&
                     NextPageInputParameters.Equals(other.NextPageInputParameters)
                 ));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns true if EntityListModel instances are equal
        /// </summary>
        /// <param name="other">Instance of EntityListModel to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(EntityListModel other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     TotalCount == other.TotalCount ||
                     TotalCount != null &&
                     TotalCount.Equals(other.TotalCount)
                     ) &&
                 (
                     Items == other.Items ||
                     Items != null &&
                     Items.SequenceEqual(other.Items)
                 ));
        }