示例#1
0
        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");
        }
示例#2
0
 public ReportManager SetSuccessor(ReportManager successor)
 {
     Successor = successor;
     return(successor);
 }
示例#3
0
 public Employee(ReportManager reportManager, string fullName)
 {
     _reportManager = reportManager;
     FullName       = fullName;
 }