コード例 #1
0
        internal void RemoveFromCreateOnly_Children(CreateOnly_Child createOnly_Child)
        {
#if DEBUG
            if (!createOnly_Children.Remove(createOnly_Child))
            {
                throw new Exception();
            }
#else
            createOnly_Children.Remove(createOnly_Child);
#endif
            onRemovedFromCreateOnly_Children(createOnly_Child);
#if DEBUG
            DC.Trace?.Invoke($"Remove CreateOnly_Child {createOnly_Child.GetKeyOrHash()} from " +
                             $"{this.GetKeyOrHash()} CreateOnly_ParentNullable.CreateOnly_Children");
#endif
        }
コード例 #2
0
        internal void AddToCreateOnly_Children(CreateOnly_Child createOnly_Child)
        {
#if DEBUG
            if (createOnly_Child == CreateOnly_Child.NoCreateOnly_Child)
            {
                throw new Exception();
            }
            if ((createOnly_Child.Key >= 0) && (Key < 0))
            {
                throw new Exception();
            }
            if (createOnly_Children.Contains(createOnly_Child))
            {
                throw new Exception();
            }
#endif
            createOnly_Children.Add(createOnly_Child);
            onAddedToCreateOnly_Children(createOnly_Child);
#if DEBUG
            DC.Trace?.Invoke($"Add CreateOnly_Child {createOnly_Child.GetKeyOrHash()} to " +
                             $"{this.GetKeyOrHash()} CreateOnly_ParentNullable.CreateOnly_Children");
#endif
        }
コード例 #3
0
 /// <summary>
 /// Called after a createOnly_Child gets added to CreateOnly_Children.
 /// </summary>
 partial void onAddedToCreateOnly_Children(CreateOnly_Child createOnly_Child)
 {
 }
コード例 #4
0
 partial void onRemovedFromCreateOnly_Children(CreateOnly_Child createOnly_Child);