コード例 #1
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 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);
        }
コード例 #2
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);
        }
コード例 #3
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);
        }
コード例 #4
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);
        }
コード例 #5
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);
        }
コード例 #6
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);
        }
コード例 #7
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);
        }
コード例 #8
0
        /// <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;
        }
コード例 #9
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);
        }
コード例 #10
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);
        }
コード例 #11
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 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);
        }
コード例 #12
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);
        }
コード例 #13
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 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);
        }
コード例 #14
0
        /// <inheritdoc/>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out ReadOnlyNodeStateView AsNodeStateView))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(State, AsNodeStateView.State))
            {
                return(comparer.Failed());
            }

            return(true);
        }
コード例 #15
0
        /// <summary>
        /// Compares two <see cref="IReadOnlyNodeStateView"/> 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 ReadOnlyNodeStateView AsNodeStateView))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(State, AsNodeStateView.State))
            {
                return(comparer.Failed());
            }

            return(true);
        }
コード例 #16
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 ReadOnlyRootNodeIndex AsRootNodeIndex))
            {
                return(comparer.Failed());
            }

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

            return(true);
        }
コード例 #17
0
        /// <inheritdoc/>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out ReadOnlyRootNodeIndex AsRootNodeIndex))
            {
                return(comparer.Failed());
            }

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

            return(true);
        }
コード例 #18
0
        /// <summary>
        /// Compares two <see cref="IReadOnlyBlockState"/> 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 ReadOnlyBlockState <IInner> AsBlockState))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(ParentInner, AsBlockState.ParentInner))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(ChildBlock, AsBlockState.ChildBlock))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual((IEqualComparable)PatternIndex, (IEqualComparable)AsBlockState.PatternIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(PatternState, AsBlockState.PatternState))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual((IEqualComparable)SourceIndex, (IEqualComparable)AsBlockState.SourceIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(SourceState, AsBlockState.SourceState))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(StateList, AsBlockState.StateList))
            {
                return(comparer.Failed());
            }

            return(true);
        }
コード例 #19
0
        /// <inheritdoc/>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            if (!comparer.IsSameType(other, out ReadOnlyBrowsingPlaceholderNodeIndex AsPlaceholderNodeIndex))
            {
                return(comparer.Failed());
            }

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

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

            return(true);
        }
コード例 #20
0
        /// <summary>
        /// Compares two <see cref="FrameCommentCellView"/> 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 FrameCommentCellView AsCommentCellView))
            {
                return(comparer.Failed());
            }

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

            if (!comparer.IsSameReference(Documentation, AsCommentCellView.Documentation))
            {
                return(comparer.Failed());
            }

            return(true);
        }
コード例 #21
0
        /// <summary>
        /// Compares two <see cref="IFrameOptionalNodeStateView"/> 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 FrameOptionalNodeStateView AsOptionalNodeStateView))
            {
                return(comparer.Failed());
            }

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

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

            if (!comparer.IsTrue((RootCellView == null || AsOptionalNodeStateView.RootCellView != null) && (RootCellView != null || AsOptionalNodeStateView.RootCellView == null)))
            {
                return(comparer.Failed());
            }

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

                if (!comparer.VerifyEqual(RootCellView, AsOptionalNodeStateView.RootCellView))
                {
                    return(comparer.Failed());
                }

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

            return(true);
        }
コード例 #22
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 ReadOnlyBrowsingOptionalNodeIndex AsOptionalNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Optional, AsOptionalNodeIndex.Optional))
            {
                return(comparer.Failed());
            }

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

            return(true);
        }
コード例 #23
0
        /// <inheritdoc/>
        public virtual bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            Contract.RequireNotNull(other, out IEqualComparable Other);

            if (!comparer.IsSameType(Other, out ReadOnlyBrowsingOptionalNodeIndex AsOptionalNodeIndex))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(Optional, AsOptionalNodeIndex.Optional))
            {
                return(comparer.Failed());
            }

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

            return(true);
        }
コード例 #24
0
        /// <summary>
        /// Compares two <see cref="IFocusFrameSelector"/> 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 IFocusFrameSelector AsFrameSelector))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameString(SelectorName, AsFrameSelector.SelectorName))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(SelectorType, AsFrameSelector.SelectorType))
            {
                return(comparer.Failed());
            }

            return(true);
        }
コード例 #25
0
        /// <summary>
        /// Compares two <see cref="FocusFrameSelector"/> 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 IFocusFrameSelector AsFrameSelector))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameString(SelectorName, AsFrameSelector.SelectorName))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameReference(SelectorType, AsFrameSelector.SelectorType))
            {
                return(comparer.Failed());
            }

            return(true);
        }
コード例 #26
0
        /// <inheritdoc/>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            if (!comparer.IsSameType(other, out ReadOnlySourceState <IInner> AsSourceState))
            {
                return(comparer.Failed());
            }

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

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

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

            return(true);
        }
コード例 #27
0
        /// <inheritdoc/>
        public override bool IsEqual(CompareEqual comparer, IEqualComparable other)
        {
            if (!comparer.IsSameType(other, out ReadOnlyEmptyNodeState <IInner> AsEmptyNodeState))
            {
                return(comparer.Failed());
            }

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

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

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

            return(true);
        }