示例#1
0
        private void OnWorkPerformed(int hours, ActionType actionType, Location location)
        {
            var eventArgs = new ReportHoursEventArgs
            {
                Hours      = hours,
                ActionType = actionType,
                Location   = location
            };

            ReportEvent?.Invoke(this, eventArgs);
        }
示例#2
0
 private static void ReportHoursHandler(object sender, ReportHoursEventArgs e)
 {
     Console.WriteLine($"Hours: {e.Hours}, Action Type: {e.ActionType}, at Location: {e.Location.Name}");
 }