internal bool Add(XType xt) { if (types.Count == 0) { IsRestricted = xt.IsRestricted; } else if (IsRestricted) { XType xto = First(); if (!xt.Equals(xto)) { throw new Exception(string.Format("invalid type set construction: {0} / {1}", xto, xt)); } return(false); } else if (xt.IsRestricted) { throw new Exception(string.Format("adding restricted type {0} to a non-empty set", xt)); } return(types.Add(xt)); }
/// <inheritdoc /> public bool Equals([AllowNull] HeatMap other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Visible == other.Visible || Visible != null && Visible.Equals(other.Visible) ) && ( LegendGroup == other.LegendGroup || LegendGroup != null && LegendGroup.Equals(other.LegendGroup) ) && ( Opacity == other.Opacity || Opacity != null && Opacity.Equals(other.Opacity) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( UId == other.UId || UId != null && UId.Equals(other.UId) ) && ( Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids) ) && ( Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData) ) && ( Meta == other.Meta || Meta != null && Meta.Equals(other.Meta) ) && ( Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray) ) && ( HoverInfo == other.HoverInfo || HoverInfo != null && HoverInfo.Equals(other.HoverInfo) ) && ( Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray) ) && ( HoverLabel == other.HoverLabel || HoverLabel != null && HoverLabel.Equals(other.HoverLabel) ) && ( Stream == other.Stream || Stream != null && Stream.Equals(other.Stream) ) && ( Equals(Transforms, other.Transforms) || Transforms != null && other.Transforms != null && Transforms.SequenceEqual(other.Transforms) ) && ( UiRevision == other.UiRevision || UiRevision != null && UiRevision.Equals(other.UiRevision) ) && ( Equals(Z, other.Z) || Z != null && other.Z != null && Z.SequenceEqual(other.Z) ) && ( Equals(X, other.X) || X != null && other.X != null && X.SequenceEqual(other.X) ) && ( X0 == other.X0 || X0 != null && X0.Equals(other.X0) ) && ( DX == other.DX || DX != null && DX.Equals(other.DX) ) && ( Equals(Y, other.Y) || Y != null && other.Y != null && Y.SequenceEqual(other.Y) ) && ( Y0 == other.Y0 || Y0 != null && Y0.Equals(other.Y0) ) && ( Dy == other.Dy || Dy != null && Dy.Equals(other.Dy) ) && ( Equals(Text, other.Text) || Text != null && other.Text != null && Text.SequenceEqual(other.Text) ) && ( Equals(HoverText, other.HoverText) || HoverText != null && other.HoverText != null && HoverText.SequenceEqual(other.HoverText) ) && ( Transpose == other.Transpose || Transpose != null && Transpose.Equals(other.Transpose) ) && ( XType == other.XType || XType != null && XType.Equals(other.XType) ) && ( YType == other.YType || YType != null && YType.Equals(other.YType) ) && ( ZSmooth == other.ZSmooth || ZSmooth != null && ZSmooth.Equals(other.ZSmooth) ) && ( HoverOnGaps == other.HoverOnGaps || HoverOnGaps != null && HoverOnGaps.Equals(other.HoverOnGaps) ) && ( ConnectGaps == other.ConnectGaps || ConnectGaps != null && ConnectGaps.Equals(other.ConnectGaps) ) && ( XGap == other.XGap || XGap != null && XGap.Equals(other.XGap) ) && ( YGap == other.YGap || YGap != null && YGap.Equals(other.YGap) ) && ( ZHoverFormat == other.ZHoverFormat || ZHoverFormat != null && ZHoverFormat.Equals(other.ZHoverFormat) ) && ( HoverTemplate == other.HoverTemplate || HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate) ) && ( Equals(HoverTemplateArray, other.HoverTemplateArray) || HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray) ) && ( ShowLegend == other.ShowLegend || ShowLegend != null && ShowLegend.Equals(other.ShowLegend) ) && ( ZAuto == other.ZAuto || ZAuto != null && ZAuto.Equals(other.ZAuto) ) && ( ZMin == other.ZMin || ZMin != null && ZMin.Equals(other.ZMin) ) && ( ZMax == other.ZMax || ZMax != null && ZMax.Equals(other.ZMax) ) && ( ZMid == other.ZMid || ZMid != null && ZMid.Equals(other.ZMid) ) && ( ColorScale == other.ColorScale || ColorScale != null && ColorScale.Equals(other.ColorScale) ) && ( AutoColorScale == other.AutoColorScale || AutoColorScale != null && AutoColorScale.Equals(other.AutoColorScale) ) && ( ReverseScale == other.ReverseScale || ReverseScale != null && ReverseScale.Equals(other.ReverseScale) ) && ( ShowScale == other.ShowScale || ShowScale != null && ShowScale.Equals(other.ShowScale) ) && ( ColorBar == other.ColorBar || ColorBar != null && ColorBar.Equals(other.ColorBar) ) && ( ColorAxis == other.ColorAxis || ColorAxis != null && ColorAxis.Equals(other.ColorAxis) ) && ( XCalendar == other.XCalendar || XCalendar != null && XCalendar.Equals(other.XCalendar) ) && ( YCalendar == other.YCalendar || YCalendar != null && YCalendar.Equals(other.YCalendar) ) && ( XAxis == other.XAxis || XAxis != null && XAxis.Equals(other.XAxis) ) && ( YAxis == other.YAxis || YAxis != null && YAxis.Equals(other.YAxis) ) && ( IdsSrc == other.IdsSrc || IdsSrc != null && IdsSrc.Equals(other.IdsSrc) ) && ( CustomDataSrc == other.CustomDataSrc || CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc) ) && ( MetaSrc == other.MetaSrc || MetaSrc != null && MetaSrc.Equals(other.MetaSrc) ) && ( HoverInfoSrc == other.HoverInfoSrc || HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc) ) && ( ZSrc == other.ZSrc || ZSrc != null && ZSrc.Equals(other.ZSrc) ) && ( XSrc == other.XSrc || XSrc != null && XSrc.Equals(other.XSrc) ) && ( YSrc == other.YSrc || YSrc != null && YSrc.Equals(other.YSrc) ) && ( TextSrc == other.TextSrc || TextSrc != null && TextSrc.Equals(other.TextSrc) ) && ( HoverTextSrc == other.HoverTextSrc || HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc) ) && ( HoverTemplateSrc == other.HoverTemplateSrc || HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc) )); }