コード例 #1
0
        public EventStoreRebuilderEngine(
            IInMemoryBus bus,
            ICommandProcessor commandProcessor, ICommandHandlerRegistry commandHandlerRegistry, IEventDispatcher eventDispatcher,
            ITextSerializer serializer, IMetadataProvider metadataProvider,
            ITracer tracer,
            IEventStoreRebuilderConfig config,
            IRebuilderPerfCounter perfCounter)
        {
            this.bus                    = bus;
            this.serializer             = serializer;
            this.eventDispatcher        = eventDispatcher;
            this.commandProcessor       = commandProcessor;
            this.commandHandlerRegistry = commandHandlerRegistry;
            this.config                 = config;
            this.tracer                 = tracer;
            this.metadataProvider       = metadataProvider;
            this.perfCounter            = perfCounter;

            this.sourceContextFactory = () =>
            {
                var context = new EventStoreDbContext(this.config.SourceEventStoreConnectionString);
                context.Configuration.AutoDetectChangesEnabled = false;
                return(context);
            };
            this.newContextFactory = () => new EventStoreDbContext(this.config.NewEventStoreConnectionString);
        }
コード例 #2
0
        public DomainEventStoreRebuilderRegistry()
        {
            this.config = DefaultWorkerRoleConfigProvider.Configuration;

            this.registrationList = RegisterComplexEventProcessors(new List <Action <IUnityContainer, IEventHandlerRegistry> >());
        }