/// <summary> /// First time initialization and reconfig in case of restore /// </summary> /// <param name="model"></param> private void Configure(Model model) { _commandStore = _config.CreateCommandStore(); _snapshotStore = _config.CreateSnapshotStore(); _journalAppender = JournalAppender.Create(model.Revision + 1, _commandStore); _kernel = _config.CreateKernel(model); _kernel.SetSynchronizer(_synchronizer); }
/// <summary> /// First time initialization and reconfig in case of restore /// </summary> /// <param name="model"></param> private void Configure(Model model) { _commandStore = _config.CreateCommandStore(); _snapshotStore = _config.CreateSnapshotStore(); _journalAppender = JournalAppender.Create(model.Revision + 1, _commandStore); _kernel = _config.CreateKernel(model); _kernel.SetSynchronizer(_synchronizer); //Capture events emitted during Command.Execute model.Events.Subscribe(e => _capturedEvents.Add(e)); }