internal Context(CqrsEngine cqrsEngine, string name, long failedCommandRetryDelay) : base(name) { if (name.ToLower() == "default") { throw new ArgumentException("default is reserved name", nameof(name)); } _cqrsEngine = cqrsEngine; FailedCommandRetryDelay = failedCommandRetryDelay; EventsPublisher = new EventsPublisher(cqrsEngine, this); CommandDispatcher = cqrsEngine.CreateCommandsDispatcher(Name, failedCommandRetryDelay); EventDispatcher = cqrsEngine.CreateEventsDispatcher(Name); Processes = new List <IProcess>(); }
/// <summary> /// C-tor. /// </summary> public EventsPublisher(CqrsEngine cqrsEngine, Context context) { m_Context = context; m_CqrsEngine = cqrsEngine; }