示例#1
0
        private void OnVacationApproved(VacationIsApproved message)
        {
            if (this.EventsById.TryGetValue(message.EventId, out var calendarEvent))
            {
                this.EventsById[message.EventId] = new CalendarEvent(message.EventId, calendarEvent.Type, calendarEvent.Dates, VacationStatuses.Approved, this.EmployeeId);

                var text = $"Got vacation approved from {calendarEvent.Dates.StartDate.ToLongDateString()} to {calendarEvent.Dates.EndDate.ToLongDateString()}";
                var msg  = new Message(Guid.NewGuid().ToString(), this.EmployeeId, "Vacation", text, message.TimeStamp.Date);
                this.employeeFeed.Tell(new PostMessage(msg));
            }
        }
示例#2
0
 private void OnVacationApproved(VacationIsApproved message)
 {
     if (this.eventsById.TryGetValue(message.EventId, out var calendarEvent))
     {
         this.eventsById[message.EventId] = new CalendarEvent(
             message.EventId,
             calendarEvent.Type,
             calendarEvent.Dates,
             VacationStatuses.Approved,
             calendarEvent.EmployeeId);
     }
 }