private void OnWorkPerformed(int hours, ActionType actionType, Location location) { var eventArgs = new ReportHoursEventArgs { Hours = hours, ActionType = actionType, Location = location }; ReportEvent?.Invoke(this, eventArgs); }
private static void ReportHoursHandler(object sender, ReportHoursEventArgs e) { Console.WriteLine($"Hours: {e.Hours}, Action Type: {e.ActionType}, at Location: {e.Location.Name}"); }