예제 #1
0
파일: Program.cs 프로젝트: matrap/patterns
        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;
 }