private void PersonLeft(object sender, EmployeeEventArgs e) { _persons.Remove(e.Person); foreach (var person in _persons) { person.SayGoodBye(e.Person); } }
private void PersonCame(object sender, EmployeeEventArgs e) { foreach (var person in _persons) { person.SayHello(e.Person, e.Time); } _persons.Add(e.Person); }
protected virtual void OnLeft(EmployeeEventArgs e) { if (LeftEvent != null) LeftEvent(this, e); }
protected virtual void OnCame(EmployeeEventArgs e) { if (ComeEvent != null) ComeEvent(this, e); }