internal BatchManager( ILogFactory logFactory, long failedEventRetryDelay, EventInterceptorsQueue eventInterceptorsProcessor, int batchSize = 0, long applyTimeout = 0, Func <object> beforeBatchApply = null, Action <object> afterBatchApply = null) { _afterBatchApply = afterBatchApply ?? (o => { }); _beforeBatchApply = beforeBatchApply ?? (() => null); _log = logFactory.CreateLog(this); _eventInterceptorsProcessor = eventInterceptorsProcessor; _failedEventRetryDelay = failedEventRetryDelay; ApplyTimeout = applyTimeout; _batchSize = batchSize; }
public CqrsEngine( ILog log, IDependencyResolver dependencyResolver, IMessagingEngine messagingEngine, IEndpointProvider endpointProvider, bool createMissingEndpoints, params IRegistration[] registrations) { _log = log; _createMissingEndpoints = createMissingEndpoints; DependencyResolver = dependencyResolver; EndpointResolver = new DefaultEndpointResolver(); MessagingEngine = messagingEngine; _endpointProvider = endpointProvider; Contexts = new List <Context>(); DefaultRouteMap = new RouteMap("default"); CommandInterceptorsQueue = new CommandInterceptorsQueue(); EventInterceptorsQueue = new EventInterceptorsQueue(); InitRegistrations(registrations); }