Exemplo n.º 1
0
        private BaseEvent InternalEndBatch(BatchEvent stack)
        {
            BaseEvent processed = ProcessBatch(_currentBatch);

            if (processed != null)
            {
                stack.Push(processed);
            }
            _currentBatch = null;
            return(processed);
        }
Exemplo n.º 2
0
        protected internal override BaseEvent Rollback()
        {
            var batch = new BatchEvent();

            while (Count > 0)
            {
                var reverse = Pop().Rollback();
                if (reverse == null)
                {
                    continue;
                }
                if (reverse is BatchEvent)
                {
                    throw new InvalidOperationException("Must not return BatchEvent in Rollback()");
                }
                batch.Push(reverse);
            }
            return(batch);
        }