protected ObjectWithReferences(ObjectWithReferences parent) { Parent = parent; if (parent != null) { parent.AddChild(this); } }
private void AddChild(ObjectWithReferences child) { if (childs == null) { childs = new List <ObjectWithReferences>(); } childs.Add(child); if (IsDisposed) { child.Dispose(); } }