示例#1
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="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);
        }
示例#3
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);
        }
        /// <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);
        }
示例#5
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);
        }
示例#6
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);
        }