コード例 #1
0
 public void Initialize()
 {
     var logService = LogManager.GetLogger("Event Dispatcher");
     var eventStoreConnectionFactory = new EventStoreConnectionFactory();
     var mongoDbFactory = new MongoDbAtomicWriterFactory(connectionString, connectionName);
     var projections = projectionRegistry.GetMongoDbProjections(mongoDbFactory).ToArray();
     var repository = new MongoDbEventPositionRepository(connectionString, connectionName);
     var eventDispatcher = new EventDispatcher(projections, logService);
     var processor = new EventProcessor(eventStoreConnectionFactory, eventDispatcher, repository, logService);
     Task.Run(() => processor.Start(connectionName));
 }
コード例 #2
0
        public void Initialize()
        {
            var logService = LogManager.GetLogger("Event Dispatcher");
            var eventStoreConnectionFactory = new EventStoreConnectionFactory();
            var mongoDbFactory  = new MongoDbAtomicWriterFactory(connectionString, connectionName);
            var projections     = projectionRegistry.GetMongoDbProjections(mongoDbFactory).ToArray();
            var repository      = new MongoDbEventPositionRepository(connectionString, connectionName);
            var eventDispatcher = new EventDispatcher(projections, logService);
            var processor       = new EventProcessor(eventStoreConnectionFactory, eventDispatcher, repository, logService);

            Task.Run(() => processor.Start(connectionName));
        }