Beispiel #1
0
        public override bool Compensate(WorkLog item, RoutingSlip routingSlip)
        {
            object reservationId = item.Result["reservationId"];

            Logger.Message($"Cancelled flight {reservationId}.");

            return(true);
        }
Beispiel #2
0
        public bool UndoLast()
        {
            if (!IsInProgress)
            {
                throw new InvalidOperationException();
            }

            WorkLog currentItem = _completedWorkLogs.Pop();
            var     activity    = (Activity)Activator.CreateInstance(currentItem.ActivityType);

            try
            {
                return(activity.Compensate(currentItem, this));
            }
            catch (Exception ex)
            {
                Logger.Exception(ex, "Exception occurred during undo last method.");
                throw;
            }
        }
Beispiel #3
0
 public abstract bool Compensate(WorkLog item, RoutingSlip routingSlip);