public virtual string GetFullInfo(string info = "") { info += ToString(); IEnumerator iterator = CreateIterator(); bool hasNext = iterator.MoveNext(); while (hasNext) { EmployeeComponent employee = (EmployeeComponent)iterator.Current; info = employee.GetFullInfo(info); hasNext = iterator.MoveNext(); } return(info); }
public void PrintHierarchy() { _output.Print($"There are direct hierarchy of company:"); _output.Print(_root.GetFullInfo()); }