Beispiel #1
0
        public static void Main()
        {
            var employee = new Employee("Name");
            var manager  = new Employee("Manager name");

            var printer = new DetailsPrinter(new List <Employee> {
                employee, manager
            });

            printer.printDetails();
        }
        public static void Main()
        {
            List <Employee> employees = new List <Employee>
            {
                new Employee("Pesho"),
                new Manager("Gosho", new List <string> {
                    "firstDoc", "secondDoc"
                })
            };
            DetailsPrinter detailsPrinter = new DetailsPrinter(employees);

            detailsPrinter.printDetails();
        }
Beispiel #3
0
        public static void Main()
        {
            IEmployee manager = new Manager("Gosho", new List <string>()
            {
                "Doc1", "Doc2"
            });
            IEmployee         employee      = new Employee("Pesho rabotniko");
            IList <IEmployee> employeesList = new List <IEmployee>()
            {
                manager, employee
            };
            DetailsPrinter printer = new DetailsPrinter(employeesList);

            printer.printDetails();
        }
Beispiel #4
0
        public static void Main()
        {
            List <string> list = new List <string>();

            list.Add("rgsadfsdf");
            list.Add("uthdfgwerwerfe");
            list.Add("564351351gr");
            Employee        emp  = new Employee("Gosho");
            Employee        man  = new Manager("Pesho", list);
            List <Employee> emps = new List <Employee>();

            emps.Add(emp);
            emps.Add(man);
            emps.Add(emp);
            emps.Add(emp);
            emps.Add(man);
            DetailsPrinter printer = new DetailsPrinter(emps);

            printer.printDetails();
        }