Пример #1
0
 private void ScheduleToCheckSeatsReservationExpiration(IReadOnlyList <IDomainEvent> reservationEvents)
 {
     foreach (var @event in reservationEvents.OfType <SeatsWereReserved>())
     {
         var command = new CheckSeatsReservationExpiration(
             @event.ClientId,
             @event.ScreeningId,
             @event.Seats)
         {
             At = @event.At
         };
         _commandScheduler.Schedule(command, ScreeningReservation.ExpirationDelay);
     }
 }
Пример #2
0
 private void Handle(CheckSeatsReservationExpiration command) =>
 ScreeningReservationById(command.ScreeningId)
 .CheckSeatsReservationExpiration(command.ClientId, command.Seats)
 .AppendEventsTo(_eventStore);