Example #1
0
        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);
        }
Example #2
0
 public void PrintHierarchy()
 {
     _output.Print($"There are direct hierarchy of company:");
     _output.Print(_root.GetFullInfo());
 }