示例#1
0
        public void Commit()
        {
            var trackedObjects = GetObjectsBeingTracked();

            foreach (var trackedObject in trackedObjects)
            {
                var events = trackedObject.UncommittedEvents;
                if (events.HasEvents)
                {
                    events.MarkEventsWithCommandDetails(Command);
                    events.ExpandExecutionContext(ExecutionContext);
                    ProcessEvents(events);
                    _saga.Commit(events);
                    _uncommittedEventStreamCoordinator.Commit(events);
                    trackedObject.Commit();
                    _sagaLibrarian.Catalogue(_saga);
                }
            }
        }