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(); }
public EmployeeAdapter(HRSystem hrSystem) { _hrSystem = hrSystem; }
public Company(HRSystem hrSystem) { _company = hrSystem; }