Exemple #1
0
        internal void RemoveFromChildren(NotMatchingChildrenListName_Child notMatchingChildrenListName_Child)
        {
#if DEBUG
            if (!children.Remove(notMatchingChildrenListName_Child))
            {
                throw new Exception();
            }
#else
            children.Remove(notMatchingChildrenListName_Child);
#endif
            onRemovedFromChildren(notMatchingChildrenListName_Child);
#if DEBUG
            DC.Trace?.Invoke($"Remove NotMatchingChildrenListName_Child {notMatchingChildrenListName_Child.GetKeyOrHash()} from " +
                             $"{this.GetKeyOrHash()} NotMatchingChildrenListName_Parent.Children");
#endif
        }
Exemple #2
0
        internal void AddToChildren(NotMatchingChildrenListName_Child notMatchingChildrenListName_Child)
        {
#if DEBUG
            if (notMatchingChildrenListName_Child == NotMatchingChildrenListName_Child.NoNotMatchingChildrenListName_Child)
            {
                throw new Exception();
            }
            if ((notMatchingChildrenListName_Child.Key >= 0) && (Key < 0))
            {
                throw new Exception();
            }
            if (children.Contains(notMatchingChildrenListName_Child))
            {
                throw new Exception();
            }
#endif
            children.Add(notMatchingChildrenListName_Child);
            onAddedToChildren(notMatchingChildrenListName_Child);
#if DEBUG
            DC.Trace?.Invoke($"Add NotMatchingChildrenListName_Child {notMatchingChildrenListName_Child.GetKeyOrHash()} to " +
                             $"{this.GetKeyOrHash()} NotMatchingChildrenListName_Parent.Children");
#endif
        }
Exemple #3
0
 partial void onRemovedFromChildren(NotMatchingChildrenListName_Child notMatchingChildrenListName_Child);
Exemple #4
0
 partial void onAddedToChildren(NotMatchingChildrenListName_Child notMatchingChildrenListName_Child);