예제 #1
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                return(hashCode);
            }
        }
예제 #2
0
        public bool Equals([AllowNull] Table other)
        {
            if (other == null)
            {
                return(false);
            }

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

            return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) &&
                   (Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) &&
                   (Name == other.Name && Name != null && other.Name != null && Name.Equals(other.Name)) &&
                   (UId == other.UId && UId != null && other.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 && other.Meta != null && Meta.Equals(other.Meta)) &&
                   (Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray)) &&
                   (HoverInfo == other.HoverInfo && HoverInfo != null && other.HoverInfo != null && HoverInfo.Equals(other.HoverInfo)) &&
                   (Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray)) &&
                   (HoverLabel == other.HoverLabel && HoverLabel != null && other.HoverLabel != null && HoverLabel.Equals(other.HoverLabel)) &&
                   (Stream == other.Stream && Stream != null && other.Stream != null && Stream.Equals(other.Stream)) &&
                   (UiRevision == other.UiRevision && UiRevision != null && other.UiRevision != null && UiRevision.Equals(other.UiRevision)) &&
                   (Domain == other.Domain && Domain != null && other.Domain != null && Domain.Equals(other.Domain)) &&
                   (ColumnWidth == other.ColumnWidth && ColumnWidth != null && other.ColumnWidth != null && ColumnWidth.Equals(other.ColumnWidth)) &&
                   (Equals(ColumnWidthArray, other.ColumnWidthArray) || ColumnWidthArray != null && other.ColumnWidthArray != null && ColumnWidthArray.SequenceEqual(other.ColumnWidthArray)) &&
                   (Equals(ColumnOrder, other.ColumnOrder) || ColumnOrder != null && other.ColumnOrder != null && ColumnOrder.SequenceEqual(other.ColumnOrder)) &&
                   (Header == other.Header && Header != null && other.Header != null && Header.Equals(other.Header)) &&
                   (Cells == other.Cells && Cells != null && other.Cells != null && Cells.Equals(other.Cells)) &&
                   (IdsSrc == other.IdsSrc && IdsSrc != null && other.IdsSrc != null && IdsSrc.Equals(other.IdsSrc)) &&
                   (CustomDataSrc == other.CustomDataSrc && CustomDataSrc != null && other.CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc)) &&
                   (MetaSrc == other.MetaSrc && MetaSrc != null && other.MetaSrc != null && MetaSrc.Equals(other.MetaSrc)) &&
                   (HoverInfoSrc == other.HoverInfoSrc && HoverInfoSrc != null && other.HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc)) &&
                   (ColumnWidthSrc == other.ColumnWidthSrc && ColumnWidthSrc != null && other.ColumnWidthSrc != null && ColumnWidthSrc.Equals(other.ColumnWidthSrc)) &&
                   (ColumnOrderSrc == other.ColumnOrderSrc && ColumnOrderSrc != null && other.ColumnOrderSrc != null && ColumnOrderSrc.Equals(other.ColumnOrderSrc)));
        }