示例#1
0
        internal void RemoveFromChildrenList_Children(ChildrenList_Child childrenList_Child)
        {
#if DEBUG
            if (!childrenList_Children.Remove(childrenList_Child))
            {
                throw new Exception();
            }
#else
            childrenList_Children.Remove(childrenList_Child);
#endif
            onRemovedFromChildrenList_Children(childrenList_Child);
#if DEBUG
            DC.Trace?.Invoke($"Remove ChildrenList_Child {childrenList_Child.GetKeyOrHash()} from " +
                             $"{this.GetKeyOrHash()} ChildrenList_CreateOnlyParent.ChildrenList_Children");
#endif
        }
示例#2
0
        internal void AddToChildrenList_Children(ChildrenList_Child childrenList_Child)
        {
#if DEBUG
            if (childrenList_Child == ChildrenList_Child.NoChildrenList_Child)
            {
                throw new Exception();
            }
            if ((childrenList_Child.Key >= 0) && (Key < 0))
            {
                throw new Exception();
            }
            if (childrenList_Children.Contains(childrenList_Child))
            {
                throw new Exception();
            }
#endif
            childrenList_Children.Add(childrenList_Child);
            onAddedToChildrenList_Children(childrenList_Child);
#if DEBUG
            DC.Trace?.Invoke($"Add ChildrenList_Child {childrenList_Child.GetKeyOrHash()} to " +
                             $"{this.GetKeyOrHash()} ChildrenList_CreateOnlyParent.ChildrenList_Children");
#endif
        }
示例#3
0
 /// <summary>
 /// Called after a childrenList_Child gets added to ChildrenList_Children.
 /// </summary>
 partial void onAddedToChildrenList_Children(ChildrenList_Child childrenList_Child)
 {
 }
 /// <summary>
 /// Called after a childrenList_Child gets removed from ChildrenList_Children.
 /// </summary>
 partial void onRemovedFromChildrenList_Children(ChildrenList_Child childrenList_Child)
 {
 }