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 }
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 }
partial void onRemovedFromChildren(NotMatchingChildrenListName_Child notMatchingChildrenListName_Child);
partial void onAddedToChildren(NotMatchingChildrenListName_Child notMatchingChildrenListName_Child);