protected virtual async Task InitializeAsync()
        {
            persistenceEngine = config.WriteModel.GetPersistenceEngine();

            await persistenceEngine.InitializeAsync();

            serializer = persistenceEngine.Serializer;
        }
Esempio n. 2
0
        public async Task Initialize()
        {
            checkpointPersister = config.ReadModel.GetCheckpointPersister();
            storageResetter     = config.WriteModel.GetStorageResetter();
            observerFactory     = config.ReadModel.GetPollingObserverFactory(TimeSpan.FromMinutes(1));

            await engine.InitializeAsync().ConfigureAwait(false);

            target = new CatchUpProjector <CatchUpState>(null, checkpointPersister, engine, storageResetter, observerFactory);

            var readResetter = config.ReadModel.GetStorageResetter();
            await readResetter.ResetAsync(new[] { config.ReadModel.GetTestEntityA().GetType(), config.ReadModel.GetCheckpointInfoType() });
        }
        public async Task Initialize()
        {
            checkpointPersister = config.ReadModel.GetCheckpointPersister();
            var readStorageResetter = config.ReadModel.GetStorageResetter();
            var observerFactory     = config.ReadModel.GetPollingObserverFactory(TimeSpan.FromMilliseconds(100000));

            readRepository = config.ReadModel.GetReadRepository();

            target = new CatchUpProjector <CatchUpStateWithReadModel>(new CatchUpStateWithReadModel(readRepository), checkpointPersister, engine, readStorageResetter, observerFactory);

            await engine.InitializeAsync().ConfigureAwait(false);

            var readResetter = config.ReadModel.GetStorageResetter();
            await readResetter.ResetAsync(new[] { config.ReadModel.GetTestEntityA().GetType(), config.ReadModel.GetCheckpointInfoType() });
        }
        public async Task Initialize()
        {
            persistenceEngine = config.WriteModel.GetPersistenceEngine();

            await persistenceEngine.InitializeAsync().ConfigureAwait(false);
        }