Exemplo n.º 1
0
        // A Constructor:
        public Employees()
        {
            // Calculate the employee's number:
            counter++;
            NumberOfEmployees = counter;
            ID = counter;

            //Console.WriteLine($"Counter {counter}");

            employeePublisher = new EmployeePublisher();
            employeePublisher.EmployeeEvent += DelegateEventEmployeeAdded;
        }
Exemplo n.º 2
0
 public EmployeeAddedSubscriber(EmployeePublisher pub)
 {
     pub.EmployeeEvent = HandleAddedEmployee;
 }