Beispiel #1
0
        public void Handle(AnchorAssignmentUpdated @event)
        {
            var dto  = Find(@event.SourceId);
            var seat = dto.Anchors.First(x => x.Position == @event.Position);

            Mapper.Map(@event, seat);
            Save(dto);
        }
Beispiel #2
0
 private void OnAnchorAssignmentUpdated(AnchorAssignmentUpdated e)
 {
     this.anchors[e.Position] = Mapper.Map(e, new AnchorAssignment
     {
         // Seat type is also never received again from the client.
         AnchorType = this.anchors[e.Position].AnchorType,
         // The email property is not received for updates, as those
         // are for the same attendee essentially.
         Attendee = new PersonalInfo {
             Email = this.anchors[e.Position].Attendee.Email
         }
     });
 }
Beispiel #3
0
 public void Handle(AnchorAssignmentUpdated @event)
 {
     if (!ProcessOrder(order => order.AssignmentsId == @event.SourceId, order =>
     {
         var seat = order.Anchors.FirstOrDefault(x => x.Position == @event.Position);
         if (seat != null)
         {
             seat.Attendee_FirstName = @event.Attendee.FirstName;
             seat.Attendee_LastName = @event.Attendee.LastName;
         }
         else
         {
             logger.LogError("Failed to locate the seat being updated at position {0} for assignment {1}.", @event.Position, @event.SourceId);
         }
     }))
     {
         logger.LogError("Failed to locate the order with seat assignments id {0} for the seat assignment being updated at position {1}.", @event.SourceId, @event.Position);
     }
 }