public EnvelopeDispatcher(Action<ImmutableEnvelope> action, IEnvelopeStreamer streamer, IEnvelopeQuarantine quarantine, MessageDuplicationManager manager, string dispatcherName)
 {
     _action = action;
     _quarantine = quarantine;
     _dispatcherName = dispatcherName;
     _manager = manager.GetOrAdd(this);
     _streamer = streamer;
 }
        public CqrsEngineBuilder(IEnvelopeStreamer streamer, IEnvelopeQuarantine quarantine = null, MessageDuplicationManager duplication = null)
        {
            Processes = new List<IEngineProcess>();
            Streamer = streamer;
            Quarantine = quarantine ?? new MemoryQuarantine();
            Duplication = duplication ?? new MessageDuplicationManager();

            Processes.Add(Duplication);
        }
Example #3
0
 public EnvelopeDispatcher(Action <ImmutableEnvelope> action, IEnvelopeStreamer streamer,
                           IEnvelopeQuarantine quarantine, MessageDuplicationManager manager, string dispatcherName)
 {
     _action         = action;
     _quarantine     = quarantine;
     _dispatcherName = dispatcherName;
     _manager        = manager.GetOrAdd(this);
     _streamer       = streamer;
 }