internal void RemoveFromChildrenSortedList_Children(ChildrenSortedList_Child childrenSortedList_Child) { #if DEBUG if (!childrenSortedList_Children.Remove(childrenSortedList_Child.DateKey)) { throw new Exception(); } #else childrenSortedList_Children.Remove(childrenSortedList_Child.DateKey); #endif onRemovedFromChildrenSortedList_Children(childrenSortedList_Child); #if DEBUG DC.Trace?.Invoke($"Remove ChildrenSortedList_Child {childrenSortedList_Child.GetKeyOrHash()} from " + $"{this.GetKeyOrHash()} ChildrenSortedList_Parent.ChildrenSortedList_Children"); #endif }
internal void AddToChildrenSortedList_Children(ChildrenSortedList_Child childrenSortedList_Child) { #if DEBUG if (childrenSortedList_Child == ChildrenSortedList_Child.NoChildrenSortedList_Child) { throw new Exception(); } if ((childrenSortedList_Child.Key >= 0) && (Key < 0)) { throw new Exception(); } if (childrenSortedList_Children.ContainsKey(childrenSortedList_Child.DateKey)) { throw new Exception(); } #endif childrenSortedList_Children.Add(childrenSortedList_Child.DateKey, childrenSortedList_Child); onAddedToChildrenSortedList_Children(childrenSortedList_Child); #if DEBUG DC.Trace?.Invoke($"Add ChildrenSortedList_Child {childrenSortedList_Child.GetKeyOrHash()} to " + $"{this.GetKeyOrHash()} ChildrenSortedList_Parent.ChildrenSortedList_Children"); #endif }
/// <summary> /// Called after a childrenSortedList_Child gets removed from ChildrenSortedList_Children. /// </summary> partial void onRemovedFromChildrenSortedList_Children(ChildrenSortedList_Child childrenSortedList_Child) { }
/// <summary> /// Called after a childrenSortedList_Child gets added to ChildrenSortedList_Children. /// </summary> partial void onAddedToChildrenSortedList_Children(ChildrenSortedList_Child childrenSortedList_Child) { }