protected bool RemoveChild(ChildAgent agent) { if (!children.Contains(agent)) { throw new Exception("Child not found!"); } return(children.Remove(agent)); }
protected void AddChild(ChildAgent agent) { if (children.Contains(agent)) { throw new Exception("Child already exists!"); } children.Add(agent); }
protected bool RemoveChild(ChildAgent agent) { if (!children.Contains(agent)) { throw new Exception("Child not found!"); } return children.Remove(agent); }