Exemplo n.º 1
0
        public void NotifyItemProcessed(WorkerItem item)
        {
            switch (_role)
            {
            case WorkerRole.Writer:
                Interlocked.Increment(ref _totalProcessedEventCount);
                _coordinator.NotifyEventCommitted(item.Event);
                break;

            case WorkerRole.Verifier:
                Interlocked.Increment(ref _totalProcessedEventCount);
                _coordinator.NotifyEventVerified(item.Event);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }