コード例 #1
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);
        }
コード例 #2
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);
        }
コード例 #3
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);
        }
コード例 #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="FrameContentFocusableCellView"/> 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 FrameContentFocusableCellView AsContentFocusableCellView))
            {
                return(comparer.Failed());
            }

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

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

            return(true);
        }
コード例 #6
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);
        }
コード例 #7
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);
        }
コード例 #8
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);
        }
コード例 #9
0
        /// <summary>
        /// Compares two <see cref="IReadOnlyInner"/> 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 ReadOnlyInner <IIndex> AsInner))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(Owner, AsInner.Owner))
            {
                return(comparer.Failed());
            }

            if (!comparer.IsSameString(PropertyName, AsInner.PropertyName))
            {
                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 ReadOnlyInner <IIndex> AsInner))
            {
                return(comparer.Failed());
            }

            if (!comparer.VerifyEqual(Owner, AsInner.Owner))
            {
                return(comparer.Failed());
            }

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

            return(true);
        }
コード例 #11
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 FrameDiscreteContentFocusableCellView AsMultiDiscreteFocusableCellView))
            {
                return(comparer.Failed());
            }

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

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

            return(true);
        }
コード例 #12
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);
        }
コード例 #13
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);
        }