Exemple #1
0
        /// <summary>
        /// Checks if a index collection is contained is a list of index collection.
        /// . Properties must be different.
        /// . They must not share an index.
        /// </summary>
        /// <param name="collection">The collection to check.</param>
        /// <param name="collectionList">The list of collections already accumulated.</param>
        public static bool IsCollectionSeparate(IReadOnlyIndexCollection collection, ReadOnlyIndexCollectionReadOnlyList collectionList)
        {
            bool Result = true;

            foreach (IReadOnlyBrowsingChildIndex Index0 in collection.NodeIndexList)
            {
                foreach (IReadOnlyIndexCollection Item in collectionList)
                {
                    if (Item.PropertyName == collection.PropertyName)
                    {
                        Result = false;
                    }

                    foreach (IReadOnlyBrowsingChildIndex Index1 in Item.NodeIndexList)
                    {
                        if (Index0.Equals(Index1))
                        {
                            Result = false;
                        }
                    }
                }
            }

            return(Result);
        }
Exemple #2
0
 public void AddIndexParent(EditorIndex index)
 {
     Index0.AddParent(index);
     if (Index1 != Index0)
     {
         Index1.AddParent(index);
     }
 }