示例#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
        }
示例#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
        }
示例#3
0
 partial void onRemovedFromChildren(NotMatchingChildrenListName_Child notMatchingChildrenListName_Child);
示例#4
0
 partial void onAddedToChildren(NotMatchingChildrenListName_Child notMatchingChildrenListName_Child);