Пример #1
0
        public override int GetHashCode()
        {
            int hashCode = -1107154058;

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

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

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

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

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

            return(hashCode);
        }
        public override int GetHashCode()
        {
            int hashCode = -727857243;

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

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

            return(hashCode);
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is CatalogItemOptionValueForItemVariation other &&
                   ((ItemOptionId == null && other.ItemOptionId == null) || (ItemOptionId?.Equals(other.ItemOptionId) == true)) &&
                   ((ItemOptionValueId == null && other.ItemOptionValueId == null) || (ItemOptionValueId?.Equals(other.ItemOptionValueId) == true)));
        }
Пример #4
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is CatalogItemOptionValue other &&
                   ((ItemOptionId == null && other.ItemOptionId == null) || (ItemOptionId?.Equals(other.ItemOptionId) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) &&
                   ((Color == null && other.Color == null) || (Color?.Equals(other.Color) == true)) &&
                   ((Ordinal == null && other.Ordinal == null) || (Ordinal?.Equals(other.Ordinal) == true)));
        }