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

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

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

            foreach (TKey Key in Keys)
            {
                ILayoutAssignableCellView Value = (ILayoutAssignableCellView)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="ILayoutAssignableCellViewReadOnlyDictionary{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 LayoutAssignableCellViewReadOnlyDictionary <TKey> AsAssignableCellViewReadOnlyDictionary))
            {
                return(comparer.Failed());
            }

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

            foreach (KeyValuePair <TKey, ILayoutAssignableCellView> Entry in this)
            {
                Debug.Assert(Entry.Key != null);

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

                ILayoutAssignableCellView OtherValue = AsAssignableCellViewReadOnlyDictionary[Entry.Key] as ILayoutAssignableCellView;

                if (!comparer.IsTrue((Entry.Value != null && OtherValue != null) || (Entry.Value == null && OtherValue == null)))
                {
                    return(comparer.Failed());
                }

                if (Entry.Value != null)
                {
                    if (!comparer.VerifyEqual(Entry.Value, OtherValue))
                    {
                        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 LayoutAssignableCellViewReadOnlyDictionary <TKey> AsOtherReadOnlyDictionary))
            {
                return(comparer.Failed());
            }

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

            foreach (TKey Key in Keys)
            {
                if (!comparer.IsTrue(AsOtherReadOnlyDictionary.ContainsKey(Key)))
                {
                    return(comparer.Failed());
                }

                ILayoutAssignableCellView ThisValue  = (ILayoutAssignableCellView)this[Key];
                ILayoutAssignableCellView OtherValue = (ILayoutAssignableCellView)AsOtherReadOnlyDictionary[Key];

                if (!comparer.IsTrue((ThisValue is null && OtherValue is null) || (ThisValue is not null && OtherValue is not null)))
                {
                    return(comparer.Failed());
                }

                if (ThisValue is not null)
                {
                    if (!comparer.VerifyEqual(ThisValue, OtherValue))
                    {
                        return(comparer.Failed());
                    }
                }
            }

            return(true);
        }
 bool IDictionary <TKey, ILayoutAssignableCellView> .TryGetValue(TKey key, out ILayoutAssignableCellView value)
 {
     bool Result = TryGetValue(key, out IFrameAssignableCellView Value); value = (ILayoutAssignableCellView)Value; return(Result);
 }
 void IDictionary <TKey, ILayoutAssignableCellView> .Add(TKey key, ILayoutAssignableCellView value)
 {
     throw new NotSupportedException("Collection is read-only.");
 }
 void IDictionary <TKey, ILayoutAssignableCellView> .Add(TKey key, ILayoutAssignableCellView value)
 {
     Add(key, value);
 }