Ejemplo n.º 1
0
 protected bool RemoveChild(ChildAgent agent)
 {
     if (!children.Contains(agent))
     {
         throw new Exception("Child not found!");
     }
     return(children.Remove(agent));
 }
Ejemplo n.º 2
0
		protected void AddChild(ChildAgent agent)
		{
			if (children.Contains(agent))
			{
				throw new Exception("Child already exists!");
			}
			children.Add(agent);
		}
Ejemplo n.º 3
0
 protected void AddChild(ChildAgent agent)
 {
     if (children.Contains(agent))
     {
         throw new Exception("Child already exists!");
     }
     children.Add(agent);
 }
Ejemplo n.º 4
0
		protected bool RemoveChild(ChildAgent agent)
		{
			if (!children.Contains(agent))
			{
				throw new Exception("Child not found!");
			}
			return children.Remove(agent);
		}