static void Main(string[] args) { ReportManager lineManager = new LineManager(); ReportManager hrManager = lineManager.SetSuccessor(new HrManager()); ReportManager director = hrManager.SetSuccessor(new Director()); var marek = new Employee(lineManager, "Marek"); marek.RequestFor("New mobile phone"); }
public ReportManager SetSuccessor(ReportManager successor) { Successor = successor; return(successor); }
public Employee(ReportManager reportManager, string fullName) { _reportManager = reportManager; FullName = fullName; }