public void SetUp()
 {
     _testEnvelopeStreamer = new TestEnvelopeStreamer(new byte[] { 1, 2, 3 });
     _testEnvelopeQuarantine = new TestEnvelopeQuarantine();
     _duplicationManager = new DuplicationManager();
     _envelopeDispatcher = new EnvelopeDispatcher(e => { ActionCalled = true; }, _testEnvelopeStreamer, _testEnvelopeQuarantine,
                                                  _duplicationManager, "D1");
 }
예제 #2
0
 public void Handle(IQueueReader inbox, Action<ImmutableEnvelope> lambda, string name = null)
 {
     var dispatcherName = name ?? "inbox-" + Interlocked.Increment(ref _counter);
     var dispatcher = new EnvelopeDispatcher(lambda, Streamer, Quarantine, Duplication, dispatcherName);
     AddTask(new DispatcherProcess(dispatcher.Dispatch, inbox));
 }