public override int GetHashCode() { int hashCode = 1353145437; if (Name != null) { hashCode += Name.GetHashCode(); } if (DisplayName != null) { hashCode += DisplayName.GetHashCode(); } if (Description != null) { hashCode += Description.GetHashCode(); } if (ShowColors != null) { hashCode += ShowColors.GetHashCode(); } if (Values != null) { hashCode += Values.GetHashCode(); } return(hashCode); }
protected void ToString(List <string> toStringOutput) { toStringOutput.Add($"Name = {(Name == null ? "null" : Name == string.Empty ? "" : Name)}"); toStringOutput.Add($"DisplayName = {(DisplayName == null ? "null" : DisplayName == string.Empty ? "" : DisplayName)}"); toStringOutput.Add($"Description = {(Description == null ? "null" : Description == string.Empty ? "" : Description)}"); toStringOutput.Add($"ShowColors = {(ShowColors == null ? "null" : ShowColors.ToString())}"); toStringOutput.Add($"Values = {(Values == null ? "null" : $"[{ string.Join(", ", Values)} ]")}"); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is CatalogItemOption other && ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) && ((DisplayName == null && other.DisplayName == null) || (DisplayName?.Equals(other.DisplayName) == true)) && ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) && ((ShowColors == null && other.ShowColors == null) || (ShowColors?.Equals(other.ShowColors) == true)) && ((Values == null && other.Values == null) || (Values?.Equals(other.Values) == true))); }