/// <summary>
        /// Compares two <see cref="FrameEmptyNodeStateView"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out FrameEmptyNodeStateView AsEmptyNodeStateView))
                return comparer.Failed();

            if (!base.IsEqual(comparer, AsEmptyNodeStateView))
                return comparer.Failed();

            if (!comparer.IsSameReference(Template, AsEmptyNodeStateView.Template))
                return comparer.Failed();

            if (!comparer.IsTrue((RootCellView == null || AsEmptyNodeStateView.RootCellView != null) && (RootCellView != null || AsEmptyNodeStateView.RootCellView == null)))
                return comparer.Failed();

            if (RootCellView != null)
            {
                Debug.Assert(CellViewTable != null);
                Debug.Assert(AsEmptyNodeStateView.CellViewTable != null);

                if (!comparer.VerifyEqual(RootCellView, AsEmptyNodeStateView.RootCellView))
                    return comparer.Failed();

                if (!comparer.VerifyEqual(CellViewTable, AsEmptyNodeStateView.CellViewTable))
                    return comparer.Failed();
            }

            return true;
        }
예제 #2
0
        /// <summary>
        /// Compares two <see cref="WriteableInsertionExistingBlockNodeIndex"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out WriteableInsertionExistingBlockNodeIndex AsInsertionExistingBlockNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsInsertionExistingBlockNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameInteger(BlockIndex, AsInsertionExistingBlockNodeIndex.BlockIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameInteger(Index, AsInsertionExistingBlockNodeIndex.Index))
            {
                return(comparer.Failed());
            }

            return(true);
        }
        /// <summary>
        /// Compares two <see cref="IFocusInnerReadOnlyDictionary{TKey}"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out FocusInnerReadOnlyDictionary <TKey> AsInnerReadOnlyDictionary))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameCount(Count, AsInnerReadOnlyDictionary.Count))
            {
                return(comparer.Failed());
            }

            foreach (KeyValuePair <TKey, IFocusInner> Entry in this)
            {
                if (!comparer.IsTrue(AsInnerReadOnlyDictionary.ContainsKey(Entry.Key)))
                {
                    return(comparer.Failed());
                }

                if (!comparer.VerifyEqual(Entry.Value, AsInnerReadOnlyDictionary[Entry.Key]))
                {
                    return(comparer.Failed());
                }
            }

            return(true);
        }
예제 #4
0
        /// <summary>
        /// Compares two <see cref="IFrameCellView"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out FrameContainerCellView AsContainerCellView))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsContainerCellView))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(ParentCellView, AsContainerCellView.ParentCellView))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(ChildStateView, AsContainerCellView.ChildStateView))
            {
                return(comparer.Failed());
            }

            return(true);
        }
        /// <inheritdoc/>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out WriteableInnerDictionary <TKey> AsOtherDictionary))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameCount(Count, AsOtherDictionary.Count))
            {
                return(comparer.Failed());
            }

            foreach (TKey Key in Keys)
            {
                IWriteableInner Value = (IWriteableInner)this[Key];

                if (!comparer.IsTrue(AsOtherDictionary.ContainsKey(Key)))
                {
                    return(comparer.Failed());
                }

                if (!comparer.VerifyEqual(Value, AsOtherDictionary[Key]))
                {
                    return(comparer.Failed());
                }
            }

            return(true);
        }
        /// <summary>
        /// Compares two <see cref="IReadOnlyNodeState"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out ReadOnlyOptionalNodeState <IInner> AsOptionalNodeState))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsOptionalNodeState))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsTrue(Optional.IsAssigned == AsOptionalNodeState.Optional.IsAssigned))
            {
                return(comparer.Failed());
            }

            if (Optional.HasItem)
            {
                if (!comparer.IsSameReference(Node, AsOptionalNodeState.Node))
                {
                    return(comparer.Failed());
                }

                if (!IsChildrenEqual(comparer, AsOptionalNodeState))
                {
                    return(comparer.Failed());
                }
            }

            return(true);
        }
        /// <summary>
        /// Compares two <see cref="IReadOnlyNodeState"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out ReadOnlyPlaceholderNodeState <IInner> AsPlaceholderNodeState))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsPlaceholderNodeState))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Node, AsPlaceholderNodeState.Node))
            {
                return(comparer.Failed());
            }

            if (!IsChildrenEqual(comparer, AsPlaceholderNodeState))
            {
                return(comparer.Failed());
            }

            return(true);
        }
예제 #8
0
        /// <inheritdoc/>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out ReadOnlyBrowsingListNodeIndex AsListNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameString(PropertyName, AsListNodeIndex.PropertyName))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(ParentNode, AsListNodeIndex.ParentNode))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameInteger(Index, AsListNodeIndex.Index))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Node, AsListNodeIndex.Node))
            {
                return(comparer.Failed());
            }

            return(true);
        }
        /// <inheritdoc/>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            if (!comparer.IsSameType(other, out ReadOnlyListInner <TIndex> AsListInner))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsListInner))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameCount(StateList.Count, AsListInner.StateList.Count))
            {
                return(comparer.Failed());
            }

            for (int i = 0; i < StateList.Count; i++)
            {
                if (!comparer.VerifyEqual(StateList[i], AsListInner.StateList[i]))
                {
                    return(comparer.Failed());
                }
            }

            return(true);
        }
예제 #10
0
        /// <inheritdoc/>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out ReadOnlyControllerView AsControllerView))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Controller, AsControllerView.Controller))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(StateViewTable, AsControllerView.StateViewTable))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(BlockStateViewTable, AsControllerView.BlockStateViewTable))
            {
                return(comparer.Failed());
            }

            return(true);
        }
        /// <summary>
        /// Compares two <see cref="IReadOnlyIndex"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out WriteableInsertionExistingBlockNodeIndex AsInsertionExistingBlockNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsInsertionExistingBlockNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameInteger(BlockIndex, AsInsertionExistingBlockNodeIndex.BlockIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameInteger(Index, AsInsertionExistingBlockNodeIndex.Index))
            {
                return(comparer.Failed());
            }

            return(true);
        }
        /// <inheritdoc/>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            if (!comparer.IsSameType(other, out ReadOnlyController AsController))
            {
                return(comparer.Failed());
            }

            if (!IsEqualFields(comparer, AsController))
            {
                return(false);
            }

            List <IReadOnlyIndex> OtherTable = new List <IReadOnlyIndex>();

            foreach (KeyValuePair <IReadOnlyIndex, IReadOnlyNodeState> Entry in AsController.StateTable)
            {
                OtherTable.Add(Entry.Key);
            }

            if (!IsEqualTable(comparer, OtherTable, out IDictionary <IReadOnlyIndex, IReadOnlyIndex> MatchTable))
            {
                return(false);
            }

            if (!IsEqualMatchTable(comparer, AsController, MatchTable))
            {
                return(false);
            }

            return(true);
        }
        /// <summary>
        /// Compares two <see cref="IReadOnlyInner"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out ReadOnlyBlockListInner <IIndex, TIndex> AsBlockListInner))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsBlockListInner))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameCount(BlockStateList.Count, AsBlockListInner.BlockStateList.Count))
            {
                return(comparer.Failed());
            }

            for (int i = 0; i < BlockStateList.Count; i++)
            {
                if (!comparer.VerifyEqual(BlockStateList[i], AsBlockListInner.BlockStateList[i]))
                {
                    return(comparer.Failed());
                }
            }

            return(true);
        }
예제 #14
0
        /// <summary>
        /// Compares two <see cref="IReadOnlyIndex"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out ReadOnlyBrowsingListNodeIndex AsListNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameString(PropertyName, AsListNodeIndex.PropertyName))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(ParentNode, AsListNodeIndex.ParentNode))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameInteger(Index, AsListNodeIndex.Index))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Node, AsListNodeIndex.Node))
            {
                return(comparer.Failed());
            }

            return(true);
        }
예제 #15
0
        /// <summary>
        /// Compares two <see cref="IFocusStateViewDictionary"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out FocusStateViewDictionary AsStateViewDictionary))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameCount(Count, AsStateViewDictionary.Count))
            {
                return(comparer.Failed());
            }

            foreach (KeyValuePair <IFocusNodeState, IFocusNodeStateView> Entry in this)
            {
                IFocusNodeState     Key   = Entry.Key;
                IFocusNodeStateView Value = Entry.Value;

                if (!comparer.IsTrue(AsStateViewDictionary.ContainsKey(Key)))
                {
                    return(comparer.Failed());
                }

                if (!comparer.VerifyEqual(Value, AsStateViewDictionary[Key]))
                {
                    return(comparer.Failed());
                }
            }

            return(true);
        }
        /// <summary>
        /// Compares two <see cref="IReadOnlyBlockStateViewDictionary"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out ReadOnlyBlockStateViewDictionary AsBlockStateViewDictionary))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameCount(Count, AsBlockStateViewDictionary.Count))
            {
                return(comparer.Failed());
            }

            foreach (KeyValuePair <IReadOnlyBlockState, IReadOnlyBlockStateView> Entry in this)
            {
                if (!comparer.IsTrue(AsBlockStateViewDictionary.ContainsKey(Entry.Key)))
                {
                    return(comparer.Failed());
                }

                if (!comparer.VerifyEqual(Entry.Value, AsBlockStateViewDictionary[Entry.Key]))
                {
                    return(comparer.Failed());
                }
            }

            return(true);
        }
        /// <summary>
        /// Compares two <see cref="IReadOnlyIndex"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out WriteableInsertionNewBlockNodeIndex AsInsertionNewBlockNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsInsertionNewBlockNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameInteger(BlockIndex, AsInsertionNewBlockNodeIndex.BlockIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(PatternNode, AsInsertionNewBlockNodeIndex.PatternNode))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(SourceNode, AsInsertionNewBlockNodeIndex.SourceNode))
            {
                return(comparer.Failed());
            }

            return(true);
        }
예제 #18
0
        /// <inheritdoc/>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out FrameAssignableCellViewDictionary <TKey> AsOtherDictionary))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameCount(Count, AsOtherDictionary.Count))
            {
                return(comparer.Failed());
            }

            foreach (KeyValuePair <TKey, IFrameAssignableCellView> Entry in this)
            {
                if (!comparer.IsTrue(AsOtherDictionary.ContainsKey(Entry.Key)))
                {
                    return(comparer.Failed());
                }

                if (!comparer.VerifyEqual(Entry.Value, AsOtherDictionary[Entry.Key]))
                {
                    return(comparer.Failed());
                }
            }

            return(true);
        }
예제 #19
0
        /// <summary>
        /// Compares two <see cref="IReadOnlyNodeState"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out ReadOnlyPatternState <IInner> AsPatternState))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsPatternState))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Node, AsPatternState.Node))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(ParentBlockState, AsPatternState.ParentBlockState))
            {
                return(comparer.Failed());
            }

            return(true);
        }
예제 #20
0
        /// <summary>
        /// Compares two <see cref="IReadOnlyNodeState"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out ReadOnlyNodeState <IInner> AsNodeState))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual((IEqualComparable)ParentIndex, (IEqualComparable)AsNodeState.ParentIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsTrue((ParentInner == null && AsNodeState.ParentInner == null) || (ParentInner != null && AsNodeState.ParentInner != null)) || (ParentInner != null && !comparer.VerifyEqual(ParentInner, AsNodeState.ParentInner)))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsTrue((ParentState == null && AsNodeState.ParentState == null) || (ParentState != null && AsNodeState.ParentState != null)) || (ParentState != null && !comparer.VerifyEqual(ParentState, AsNodeState.ParentState)))
            {
                return(comparer.Failed());
            }

            return(true);
        }
예제 #21
0
        /// <summary>
        /// Compares two <see cref="IReadOnlyIndex"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out WriteableInsertionCollectionNodeIndex AsInsertionCollectionNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(ParentNode, AsInsertionCollectionNodeIndex.ParentNode))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameString(PropertyName, AsInsertionCollectionNodeIndex.PropertyName))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Node, AsInsertionCollectionNodeIndex.Node))
            {
                return(comparer.Failed());
            }

            return(true);
        }
예제 #22
0
        /// <summary>
        /// Compares two <see cref="FrameBlockStateView"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out FrameBlockStateView AsBlockStateView))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsBlockStateView))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Template, AsBlockStateView.Template))
            {
                return(comparer.Failed());
            }

            if (!IsRootCellViewEqual(comparer, AsBlockStateView))
            {
                return(comparer.Failed());
            }

            if (!IsEmbeddingCellViewEqual(comparer, AsBlockStateView))
            {
                return(comparer.Failed());
            }

            return(true);
        }
예제 #23
0
        /// <summary>
        /// Compares two <see cref="WriteableInsertionPlaceholderNodeIndex"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out WriteableInsertionPlaceholderNodeIndex AsInsertionPlaceholderNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(ParentNode, AsInsertionPlaceholderNodeIndex.ParentNode))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameString(PropertyName, AsInsertionPlaceholderNodeIndex.PropertyName))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Node, AsInsertionPlaceholderNodeIndex.Node))
            {
                return(comparer.Failed());
            }

            return(true);
        }
예제 #24
0
        /// <summary>
        /// Compares two <see cref="IFrameBlockStateView"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out FrameBlockStateView AsBlockStateView))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsBlockStateView))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Template, AsBlockStateView.Template))
            {
                return(comparer.Failed());
            }

            if (!IsRootCellViewEqual(comparer, AsBlockStateView))
            {
                return(comparer.Failed());
            }

            if (!IsEmbeddingCellViewEqual(comparer, AsBlockStateView))
            {
                return(comparer.Failed());
            }

            return(true);
        }
예제 #25
0
        /// <summary>
        /// Compares two <see cref="IReadOnlyControllerView"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out ReadOnlyControllerView AsControllerView))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Controller, AsControllerView.Controller))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(StateViewTable, AsControllerView.StateViewTable))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(BlockStateViewTable, AsControllerView.BlockStateViewTable))
            {
                return(comparer.Failed());
            }

            return(true);
        }
예제 #26
0
        /// <summary>
        /// Compares two <see cref="IFrameCellView"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Debug.Assert(other != null);

            if (!comparer.IsSameType(other, out FrameVisibleCellView AsVisibleCellView))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsVisibleCellView))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameInteger(LineNumber, AsVisibleCellView.LineNumber))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameInteger(ColumnNumber, AsVisibleCellView.ColumnNumber))
            {
                return(comparer.Failed());
            }

            return(true);
        }
        /// <inheritdoc/>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out ReadOnlyNodeStateViewReadOnlyDictionary AsOtherReadOnlyDictionary))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameCount(Count, AsOtherReadOnlyDictionary.Count))
            {
                return(comparer.Failed());
            }

            foreach (KeyValuePair <IReadOnlyNodeState, IReadOnlyNodeStateView> Entry in this)
            {
                if (!comparer.IsTrue(AsOtherReadOnlyDictionary.ContainsKey(Entry.Key)))
                {
                    return(comparer.Failed());
                }

                if (!comparer.VerifyEqual(Entry.Value, AsOtherReadOnlyDictionary[Entry.Key]))
                {
                    return(comparer.Failed());
                }
            }

            return(true);
        }
        /// <inheritdoc/>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out LayoutBlockStateViewReadOnlyDictionary AsOtherReadOnlyDictionary))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameCount(Count, AsOtherReadOnlyDictionary.Count))
            {
                return(comparer.Failed());
            }

            foreach (ILayoutBlockState Key in Keys)
            {
                LayoutBlockStateView Value = (LayoutBlockStateView)this[Key];

                if (!comparer.IsTrue(AsOtherReadOnlyDictionary.ContainsKey(Key)))
                {
                    return(comparer.Failed());
                }

                if (!comparer.VerifyEqual(Value, AsOtherReadOnlyDictionary[Key]))
                {
                    return(comparer.Failed());
                }
            }

            return(true);
        }
예제 #29
0
        /// <summary>
        /// Compares two <see cref="FrameBrowsingListNodeIndex"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            if (!comparer.IsSameType(other, out FrameBrowsingListNodeIndex AsBrowsingListNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsBrowsingListNodeIndex))
            {
                return(comparer.Failed());
            }

            return(true);
        }
        /// <summary>
        /// Compares two <see cref="LayoutSourceStateView"/> objects.
        /// </summary>
        /// <param name="comparer">The comparison support object.</param>
        /// <param name="other">The other object.</param>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            if (!comparer.IsSameType(other, out LayoutSourceStateView AsSourceStateView))
            {
                return(comparer.Failed());
            }

            if (!base.IsEqual(comparer, AsSourceStateView))
            {
                return(comparer.Failed());
            }

            return(true);
        }