public ChildrenList_CreateOnlyChildRaw(ChildrenList_CreateOnlyChild childrenList_CreateOnlyChild)
 {
     Key  = childrenList_CreateOnlyChild.Key;
     Text = childrenList_CreateOnlyChild.Text;
     CreateOnlyParentKey                 = childrenList_CreateOnlyChild.CreateOnlyParent.Key;
     CreateOnlyParentReadonlyKey         = childrenList_CreateOnlyChild.CreateOnlyParentReadonly.Key;
     CreateOnlyParentNullableKey         = childrenList_CreateOnlyChild.CreateOnlyParentNullable?.Key;
     CreateOnlyParentNullableReadonlyKey = childrenList_CreateOnlyChild.CreateOnlyParentNullableReadonly?.Key;
 }
Пример #2
0
        internal void RemoveFromChildrenList_CreateOnlyChildren(ChildrenList_CreateOnlyChild childrenList_CreateOnlyChild)
        {
#if DEBUG
            if (!childrenList_CreateOnlyChildren.Remove(childrenList_CreateOnlyChild))
            {
                throw new Exception();
            }
#else
            childrenList_CreateOnlyChildren.Remove(childrenList_CreateOnlyChild);
#endif
            onRemovedFromChildrenList_CreateOnlyChildren(childrenList_CreateOnlyChild);
#if DEBUG
            DC.Trace?.Invoke($"Remove ChildrenList_CreateOnlyChild {childrenList_CreateOnlyChild.GetKeyOrHash()} from " +
                             $"{this.GetKeyOrHash()} ChildrenList_CreateOnlyParent.ChildrenList_CreateOnlyChildren");
#endif
        }
Пример #3
0
        internal void AddToChildrenList_CreateOnlyChildren(ChildrenList_CreateOnlyChild childrenList_CreateOnlyChild)
        {
#if DEBUG
            if (childrenList_CreateOnlyChild == ChildrenList_CreateOnlyChild.NoChildrenList_CreateOnlyChild)
            {
                throw new Exception();
            }
            if ((childrenList_CreateOnlyChild.Key >= 0) && (Key < 0))
            {
                throw new Exception();
            }
            if (childrenList_CreateOnlyChildren.Contains(childrenList_CreateOnlyChild))
            {
                throw new Exception();
            }
#endif
            childrenList_CreateOnlyChildren.Add(childrenList_CreateOnlyChild);
            onAddedToChildrenList_CreateOnlyChildren(childrenList_CreateOnlyChild);
#if DEBUG
            DC.Trace?.Invoke($"Add ChildrenList_CreateOnlyChild {childrenList_CreateOnlyChild.GetKeyOrHash()} to " +
                             $"{this.GetKeyOrHash()} ChildrenList_CreateOnlyParent.ChildrenList_CreateOnlyChildren");
#endif
        }
Пример #4
0
 /// <summary>
 /// Called after a childrenList_CreateOnlyChild gets added to ChildrenList_CreateOnlyChildren.
 /// </summary>
 partial void onAddedToChildrenList_CreateOnlyChildren(ChildrenList_CreateOnlyChild childrenList_CreateOnlyChild)
 {
 }
Пример #5
0
 partial void onRemovedFromChildrenList_CreateOnlyChildren(ChildrenList_CreateOnlyChild childrenList_CreateOnlyChild);