protected override void Dispatch(QueueItem queueItem)
        {
            var item = (QueueItem <EventProviderTransaction>)queueItem;

            Contract.Assume(item?.Items != null);

            // call projection dispatcher to dispatch items
            _projectionDispatcher.Dispatch(item.Items);
        }
        private async Task DoSomethingAsync()
        {
            ICollection <EventProviderTransactionCollection> transactionCollections;
            int skip;

            skip = GetNextStartingNumber();

            // while transaction collections are being returned, dispatch
            while ((transactionCollections = await _eventStore.GetTransactionsAsync <TAggregateRoot>(skip, _batchSize)).Any())
            {
                skip = GetNextStartingNumber();

                // dispatch transactions for each collection
                transactionCollections.ForEach(x => _dispatcher.Dispatch(x.Transactions.ToArray()));
            }
        }
Esempio n. 3
0
 protected override void TransactionCommitted(EventProviderTransaction transaction)
 {
     _dispatcher.Dispatch(transaction);
 }