Example #1
0
        static void Main(string[] args)
        {
            HRSystem hrSystemAdapter = new HRSystem();
            Company  companyObj      = new Company(hrSystemAdapter);

            companyObj.DisplayEmployees();
            Console.ReadKey();
        }
        static void Main(string[] args)
        {
            HRSystem hrSystem = new HRSystem();
            ITarget  target   = new EmployeeAdapter(hrSystem);

            foreach (var employee in target.GetEmployeeList())
            {
                Console.Write(employee);
            }

            Console.ReadKey();
        }
Example #3
0
 public EmployeeAdapter(HRSystem hrSystem)
 {
     _hrSystem = hrSystem;
 }
Example #4
0
 public Company(HRSystem hrSystem)
 {
     _company = hrSystem;
 }