/// <summary>
 /// Checks the accepting component to see if it is the type we are looking for, and if so, checks for the child given at construction.
 /// Updates the state of the visitor and ensures that it will not be evaluated again.
 /// </summary>
 /// <param name="component"></param>
 public override void Visit(ModelComponent component)
 {
     if (modelType.GetType().Equals(component.GetType()) && !evaluated)
     {
         foreach (ModelComponent mc in component.GetChildren())
         {
             if (mc == child)
             {
                 containsChild = true;
                 break;
             }
         }
         evaluated = true;
     }
 }