internal void RemoveFromChildrenDictionary_Children(ChildrenDictionary_Child childrenDictionary_Child)
        {
#if DEBUG
            if (!childrenDictionary_Children.Remove(childrenDictionary_Child.DateKey))
            {
                throw new Exception();
            }
#else
            childrenDictionary_Children.Remove(childrenDictionary_Child.DateKey);
#endif
            onRemovedFromChildrenDictionary_Children(childrenDictionary_Child);
#if DEBUG
            DC.Trace?.Invoke($"Remove ChildrenDictionary_Child {childrenDictionary_Child.GetKeyOrHash()} from " +
                             $"{this.GetKeyOrHash()} ChildrenDictionary_ParentNullable.ChildrenDictionary_Children");
#endif
        }
        internal void AddToChildrenDictionary_Children(ChildrenDictionary_Child childrenDictionary_Child)
        {
#if DEBUG
            if (childrenDictionary_Child == ChildrenDictionary_Child.NoChildrenDictionary_Child)
            {
                throw new Exception();
            }
            if ((childrenDictionary_Child.Key >= 0) && (Key < 0))
            {
                throw new Exception();
            }
            if (childrenDictionary_Children.ContainsKey(childrenDictionary_Child.DateKey))
            {
                throw new Exception();
            }
#endif
            childrenDictionary_Children.Add(childrenDictionary_Child.DateKey, childrenDictionary_Child);
            onAddedToChildrenDictionary_Children(childrenDictionary_Child);
#if DEBUG
            DC.Trace?.Invoke($"Add ChildrenDictionary_Child {childrenDictionary_Child.GetKeyOrHash()} to " +
                             $"{this.GetKeyOrHash()} ChildrenDictionary_ParentNullable.ChildrenDictionary_Children");
#endif
        }
Beispiel #3
0
 /// <summary>
 /// Called after a childrenDictionary_Child gets removed from ChildrenDictionary_Children.
 /// </summary>
 partial void onRemovedFromChildrenDictionary_Children(ChildrenDictionary_Child childrenDictionary_Child)
 {
 }
Beispiel #4
0
 /// <summary>
 /// Called after a childrenDictionary_Child gets added to ChildrenDictionary_Children.
 /// </summary>
 partial void onAddedToChildrenDictionary_Children(ChildrenDictionary_Child childrenDictionary_Child)
 {
 }