Пример #1
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

                if (StaticPlot != null)
                {
                    hashCode = hashCode * 59 + StaticPlot.GetHashCode();
                }

                if (PlotlyServerUrl != null)
                {
                    hashCode = hashCode * 59 + PlotlyServerUrl.GetHashCode();
                }

                if (Editable != null)
                {
                    hashCode = hashCode * 59 + Editable.GetHashCode();
                }

                if (Edits != null)
                {
                    hashCode = hashCode * 59 + Edits.GetHashCode();
                }

                if (AutoSizable != null)
                {
                    hashCode = hashCode * 59 + AutoSizable.GetHashCode();
                }

                if (Responsive != null)
                {
                    hashCode = hashCode * 59 + Responsive.GetHashCode();
                }

                if (FillFrame != null)
                {
                    hashCode = hashCode * 59 + FillFrame.GetHashCode();
                }

                if (FrameMargins != null)
                {
                    hashCode = hashCode * 59 + FrameMargins.GetHashCode();
                }

                if (ScrollZoom != null)
                {
                    hashCode = hashCode * 59 + ScrollZoom.GetHashCode();
                }

                if (DoubleClick != null)
                {
                    hashCode = hashCode * 59 + DoubleClick.GetHashCode();
                }

                if (DoubleClickDelay != null)
                {
                    hashCode = hashCode * 59 + DoubleClickDelay.GetHashCode();
                }

                if (ShowAxisDragHandles != null)
                {
                    hashCode = hashCode * 59 + ShowAxisDragHandles.GetHashCode();
                }

                if (ShowAxisRangeEntryBoxes != null)
                {
                    hashCode = hashCode * 59 + ShowAxisRangeEntryBoxes.GetHashCode();
                }

                if (ShowTips != null)
                {
                    hashCode = hashCode * 59 + ShowTips.GetHashCode();
                }

                if (ShowLink != null)
                {
                    hashCode = hashCode * 59 + ShowLink.GetHashCode();
                }

                if (LinkText != null)
                {
                    hashCode = hashCode * 59 + LinkText.GetHashCode();
                }

                if (SendData != null)
                {
                    hashCode = hashCode * 59 + SendData.GetHashCode();
                }

                if (ShowSources != null)
                {
                    hashCode = hashCode * 59 + ShowSources.GetHashCode();
                }

                if (DisplayModeBar != null)
                {
                    hashCode = hashCode * 59 + DisplayModeBar.GetHashCode();
                }

                if (ShowSendToCloud != null)
                {
                    hashCode = hashCode * 59 + ShowSendToCloud.GetHashCode();
                }

                if (ShowEditInChartStudio != null)
                {
                    hashCode = hashCode * 59 + ShowEditInChartStudio.GetHashCode();
                }

                if (ModeBarButtonsToRemove != null)
                {
                    hashCode = hashCode * 59 + ModeBarButtonsToRemove.GetHashCode();
                }

                if (ModeBarButtonsToAdd != null)
                {
                    hashCode = hashCode * 59 + ModeBarButtonsToAdd.GetHashCode();
                }

                if (ModeBarButtons != null)
                {
                    hashCode = hashCode * 59 + ModeBarButtons.GetHashCode();
                }

                if (ToImageButtonOptions != null)
                {
                    hashCode = hashCode * 59 + ToImageButtonOptions.GetHashCode();
                }

                if (DisplayLogo != null)
                {
                    hashCode = hashCode * 59 + DisplayLogo.GetHashCode();
                }

                if (Watermark != null)
                {
                    hashCode = hashCode * 59 + Watermark.GetHashCode();
                }

                if (PlotGlPixelRatio != null)
                {
                    hashCode = hashCode * 59 + PlotGlPixelRatio.GetHashCode();
                }

                if (SetBackground != null)
                {
                    hashCode = hashCode * 59 + SetBackground.GetHashCode();
                }

                if (TopoJsonUrl != null)
                {
                    hashCode = hashCode * 59 + TopoJsonUrl.GetHashCode();
                }

                if (MapboxAccessToken != null)
                {
                    hashCode = hashCode * 59 + MapboxAccessToken.GetHashCode();
                }

                if (Logging != null)
                {
                    hashCode = hashCode * 59 + Logging.GetHashCode();
                }

                if (NotifyOnLogging != null)
                {
                    hashCode = hashCode * 59 + NotifyOnLogging.GetHashCode();
                }

                if (QueueLength != null)
                {
                    hashCode = hashCode * 59 + QueueLength.GetHashCode();
                }

                if (GlobalTransforms != null)
                {
                    hashCode = hashCode * 59 + GlobalTransforms.GetHashCode();
                }

                if (Locale != null)
                {
                    hashCode = hashCode * 59 + Locale.GetHashCode();
                }

                if (Locales != null)
                {
                    hashCode = hashCode * 59 + Locales.GetHashCode();
                }

                return(hashCode);
            }
        }
Пример #2
0
        public bool Equals([AllowNull] Config other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return((StaticPlot == other.StaticPlot && StaticPlot != null && other.StaticPlot != null && StaticPlot.Equals(other.StaticPlot)) &&
                   (PlotlyServerUrl == other.PlotlyServerUrl && PlotlyServerUrl != null && other.PlotlyServerUrl != null && PlotlyServerUrl.Equals(other.PlotlyServerUrl)) &&
                   (Editable == other.Editable && Editable != null && other.Editable != null && Editable.Equals(other.Editable)) &&
                   (Edits == other.Edits && Edits != null && other.Edits != null && Edits.Equals(other.Edits)) &&
                   (AutoSizable == other.AutoSizable && AutoSizable != null && other.AutoSizable != null && AutoSizable.Equals(other.AutoSizable)) &&
                   (Responsive == other.Responsive && Responsive != null && other.Responsive != null && Responsive.Equals(other.Responsive)) &&
                   (FillFrame == other.FillFrame && FillFrame != null && other.FillFrame != null && FillFrame.Equals(other.FillFrame)) &&
                   (FrameMargins == other.FrameMargins && FrameMargins != null && other.FrameMargins != null && FrameMargins.Equals(other.FrameMargins)) &&
                   (ScrollZoom == other.ScrollZoom && ScrollZoom != null && other.ScrollZoom != null && ScrollZoom.Equals(other.ScrollZoom)) &&
                   (DoubleClick == other.DoubleClick && DoubleClick != null && other.DoubleClick != null && DoubleClick.Equals(other.DoubleClick)) &&
                   (DoubleClickDelay == other.DoubleClickDelay && DoubleClickDelay != null && other.DoubleClickDelay != null && DoubleClickDelay.Equals(other.DoubleClickDelay)) &&
                   (ShowAxisDragHandles == other.ShowAxisDragHandles && ShowAxisDragHandles != null && other.ShowAxisDragHandles != null && ShowAxisDragHandles.Equals(other.ShowAxisDragHandles)) &&
                   (ShowAxisRangeEntryBoxes == other.ShowAxisRangeEntryBoxes &&
                    ShowAxisRangeEntryBoxes != null &&
                    other.ShowAxisRangeEntryBoxes != null &&
                    ShowAxisRangeEntryBoxes.Equals(other.ShowAxisRangeEntryBoxes)) &&
                   (ShowTips == other.ShowTips && ShowTips != null && other.ShowTips != null && ShowTips.Equals(other.ShowTips)) &&
                   (ShowLink == other.ShowLink && ShowLink != null && other.ShowLink != null && ShowLink.Equals(other.ShowLink)) &&
                   (LinkText == other.LinkText && LinkText != null && other.LinkText != null && LinkText.Equals(other.LinkText)) &&
                   (SendData == other.SendData && SendData != null && other.SendData != null && SendData.Equals(other.SendData)) &&
                   (ShowSources == other.ShowSources && ShowSources != null && other.ShowSources != null && ShowSources.Equals(other.ShowSources)) &&
                   (DisplayModeBar == other.DisplayModeBar && DisplayModeBar != null && other.DisplayModeBar != null && DisplayModeBar.Equals(other.DisplayModeBar)) &&
                   (ShowSendToCloud == other.ShowSendToCloud && ShowSendToCloud != null && other.ShowSendToCloud != null && ShowSendToCloud.Equals(other.ShowSendToCloud)) &&
                   (ShowEditInChartStudio == other.ShowEditInChartStudio &&
                    ShowEditInChartStudio != null &&
                    other.ShowEditInChartStudio != null &&
                    ShowEditInChartStudio.Equals(other.ShowEditInChartStudio)) &&
                   (ModeBarButtonsToRemove == other.ModeBarButtonsToRemove &&
                    ModeBarButtonsToRemove != null &&
                    other.ModeBarButtonsToRemove != null &&
                    ModeBarButtonsToRemove.Equals(other.ModeBarButtonsToRemove)) &&
                   (ModeBarButtonsToAdd == other.ModeBarButtonsToAdd && ModeBarButtonsToAdd != null && other.ModeBarButtonsToAdd != null && ModeBarButtonsToAdd.Equals(other.ModeBarButtonsToAdd)) &&
                   (ModeBarButtons == other.ModeBarButtons && ModeBarButtons != null && other.ModeBarButtons != null && ModeBarButtons.Equals(other.ModeBarButtons)) &&
                   (ToImageButtonOptions == other.ToImageButtonOptions &&
                    ToImageButtonOptions != null &&
                    other.ToImageButtonOptions != null &&
                    ToImageButtonOptions.Equals(other.ToImageButtonOptions)) &&
                   (DisplayLogo == other.DisplayLogo && DisplayLogo != null && other.DisplayLogo != null && DisplayLogo.Equals(other.DisplayLogo)) &&
                   (Watermark == other.Watermark && Watermark != null && other.Watermark != null && Watermark.Equals(other.Watermark)) &&
                   (PlotGlPixelRatio == other.PlotGlPixelRatio && PlotGlPixelRatio != null && other.PlotGlPixelRatio != null && PlotGlPixelRatio.Equals(other.PlotGlPixelRatio)) &&
                   (SetBackground == other.SetBackground && SetBackground != null && other.SetBackground != null && SetBackground.Equals(other.SetBackground)) &&
                   (TopoJsonUrl == other.TopoJsonUrl && TopoJsonUrl != null && other.TopoJsonUrl != null && TopoJsonUrl.Equals(other.TopoJsonUrl)) &&
                   (MapboxAccessToken == other.MapboxAccessToken && MapboxAccessToken != null && other.MapboxAccessToken != null && MapboxAccessToken.Equals(other.MapboxAccessToken)) &&
                   (Logging == other.Logging && Logging != null && other.Logging != null && Logging.Equals(other.Logging)) &&
                   (NotifyOnLogging == other.NotifyOnLogging && NotifyOnLogging != null && other.NotifyOnLogging != null && NotifyOnLogging.Equals(other.NotifyOnLogging)) &&
                   (QueueLength == other.QueueLength && QueueLength != null && other.QueueLength != null && QueueLength.Equals(other.QueueLength)) &&
                   (GlobalTransforms == other.GlobalTransforms && GlobalTransforms != null && other.GlobalTransforms != null && GlobalTransforms.Equals(other.GlobalTransforms)) &&
                   (Locale == other.Locale && Locale != null && other.Locale != null && Locale.Equals(other.Locale)) &&
                   (Locales == other.Locales && Locales != null && other.Locales != null && Locales.Equals(other.Locales)));
        }