示例#1
0
        public override int GetHashCode()
        {
            int hashCode = -406098695;

            if (AttributeName != null)
            {
                hashCode += AttributeName.GetHashCode();
            }

            if (InitialAttributeValue != null)
            {
                hashCode += InitialAttributeValue.GetHashCode();
            }

            if (SortOrder != null)
            {
                hashCode += SortOrder.GetHashCode();
            }

            return(hashCode);
        }
示例#2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is CatalogQuerySortedAttribute other &&
                   ((AttributeName == null && other.AttributeName == null) || (AttributeName?.Equals(other.AttributeName) == true)) &&
                   ((InitialAttributeValue == null && other.InitialAttributeValue == null) || (InitialAttributeValue?.Equals(other.InitialAttributeValue) == true)) &&
                   ((SortOrder == null && other.SortOrder == null) || (SortOrder?.Equals(other.SortOrder) == true)));
        }