Ejemplo n.º 1
0
        private protected virtual bool IsCellViewProperlyAssigned(FrameAssignableCellViewReadOnlyDictionary <string> expectedCellViewTable, FrameAssignableCellViewDictionary <string> actualCellViewTable)
        {
            bool IsAssigned = true;

            string PropertyName = null;

            foreach (KeyValuePair <string, IFrameAssignableCellView> Entry in expectedCellViewTable)
            {
                if (Entry.Value == this)
                {
                    PropertyName = Entry.Key;
                    break;
                }
            }

            IsAssigned &= IsAssignedToTable == (PropertyName != null);

            if (PropertyName != null)
            {
                foreach (KeyValuePair <string, IFrameAssignableCellView> Entry in actualCellViewTable)
                {
                    IsAssigned &= Entry.Value != this;
                }

                actualCellViewTable.Add(PropertyName, this);
            }

            return(IsAssigned);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Checks if the tree of cell views under this state is valid.
        /// </summary>
        /// <param name="expectedCellViewTable">Cell views that are associated to a property of the node.</param>
        /// <param name="actualCellViewTable">Cell views that are found in the tree.</param>
        public override bool IsCellViewTreeValid(FrameAssignableCellViewReadOnlyDictionary <string> expectedCellViewTable, FrameAssignableCellViewDictionary <string> actualCellViewTable)
        {
            bool IsValid = true;

            IsValid &= BlockStateView.IsCellViewTreeValid();

            return(IsValid);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Checks if the tree of cell views under this state is valid.
        /// </summary>
        /// <param name="expectedCellViewTable">Cell views that are associated to a property of the node.</param>
        /// <param name="actualCellViewTable">Cell views that are found in the tree.</param>
        public override bool IsCellViewTreeValid(FrameAssignableCellViewReadOnlyDictionary <string> expectedCellViewTable, FrameAssignableCellViewDictionary <string> actualCellViewTable)
        {
            bool IsValid = true;

            foreach (IFrameCellView CellView in CellViewList)
            {
                IsValid &= CellView.IsCellViewTreeValid(expectedCellViewTable, actualCellViewTable);
            }

            IsValid &= IsCellViewProperlyAssigned(expectedCellViewTable, actualCellViewTable);

            return(IsValid);
        }
        private protected virtual bool AllCellViewsProperlyAssigned(FrameAssignableCellViewReadOnlyDictionary<string> expectedCellViewTable, FrameAssignableCellViewDictionary<string> actualCellViewTable)
        {
            bool IsAssigned = true;

            int ActualCount = 0;
            foreach (KeyValuePair<string, IFrameAssignableCellView> Entry in CellViewTable)
                if (Entry.Value != null)
                {
                    ActualCount++;
                    IsAssigned &= actualCellViewTable.ContainsKey(Entry.Key);
                }

            IsAssigned &= actualCellViewTable.Count == ActualCount;

            return IsAssigned;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Checks if the tree of cell views under this state is valid.
        /// </summary>
        public virtual bool IsCellViewTreeValid()
        {
            bool IsValid = true;

            IsValid &= RootCellView != null;

            if (IsValid)
            {
                FrameAssignableCellViewDictionary <string>         EmptyCellViewTable    = CreateCellViewTable();
                FrameAssignableCellViewReadOnlyDictionary <string> ExpectedCellViewTable = EmptyCellViewTable.ToReadOnly();
                FrameAssignableCellViewDictionary <string>         ActualCellViewTable   = CreateCellViewTable();
                IsValid &= RootCellView.IsCellViewTreeValid(ExpectedCellViewTable, ActualCellViewTable);
                IsValid &= ActualCellViewTable.Count == 0;
            }

            return(IsValid);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Checks if the tree of cell views under this state is valid.
 /// </summary>
 /// <param name="expectedCellViewTable">Cell views that are associated to a property of the node.</param>
 /// <param name="actualCellViewTable">Cell views that are found in the tree.</param>
 public override bool IsCellViewTreeValid(FrameAssignableCellViewReadOnlyDictionary <string> expectedCellViewTable, FrameAssignableCellViewDictionary <string> actualCellViewTable)
 {
     return(true);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Checks if the tree of cell views under this state is valid.
 /// </summary>
 /// <param name="expectedCellViewTable">Cell views that are associated to a property of the node.</param>
 /// <param name="actualCellViewTable">Cell views that are found in the tree.</param>
 public abstract bool IsCellViewTreeValid(FrameAssignableCellViewReadOnlyDictionary <string> expectedCellViewTable, FrameAssignableCellViewDictionary <string> actualCellViewTable);