示例#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();
        }
示例#2
0
        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();
        }
示例#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();
        }
示例#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();
        }