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

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

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

            return(hashCode);
        }
Пример #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is CatalogCustomAttributeDefinitionSelectionConfig other &&
                   ((MaxAllowedSelections == null && other.MaxAllowedSelections == null) || (MaxAllowedSelections?.Equals(other.MaxAllowedSelections) == true)) &&
                   ((AllowedSelections == null && other.AllowedSelections == null) || (AllowedSelections?.Equals(other.AllowedSelections) == true)));
        }
Пример #3
0
 protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"MaxAllowedSelections = {(MaxAllowedSelections == null ? "null" : MaxAllowedSelections.ToString())}");
     toStringOutput.Add($"AllowedSelections = {(AllowedSelections == null ? "null" : $"[{ string.Join(", ", AllowedSelections)} ]")}");
 }