public override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions)
        {
            var resolver = eventFlowOptions
                .UseInMemoryReadStoreFor<InMemoryTestAggregateReadModel>()
                .CreateResolver();

            _readModelPopulator = resolver.Resolve<IReadModelPopulator>();
            _queryProcessor = resolver.Resolve<IQueryProcessor>();

            return resolver;
        }
        public override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions)
        {
            var resolver = eventFlowOptions
                           .UseInMemoryReadStoreFor <InMemoryTestAggregateReadModel>()
                           .CreateResolver();

            _readModelPopulator = resolver.Resolve <IReadModelPopulator>();
            _queryProcessor     = resolver.Resolve <IQueryProcessor>();

            return(resolver);
        }
        public override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions)
        {
            var connectionSettings = ConnectionSettings.Create()
                .EnableVerboseLogging()
                .KeepReconnecting()
                .SetDefaultUserCredentials(new UserCredentials("admin", "changeit"))
                .Build();

            var resolver = eventFlowOptions
                .UseInMemoryReadStoreFor<InMemoryTestAggregateReadModel>()
                .AddMetadataProvider<AddGuidMetadataProvider>()
                .UseEventStoreEventStore(new IPEndPoint(IPAddress.Loopback, 1113), connectionSettings)
                .CreateResolver();

            _queryProcessor = resolver.Resolve<IQueryProcessor>();
            _readModelPopulator = resolver.Resolve<IReadModelPopulator>();

            return resolver;
        }
Example #4
0
            public override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions)
            {
                var storePath = Path.Combine(
                    Path.GetTempPath(),
                    Guid.NewGuid().ToString());

                Directory.CreateDirectory(storePath);

                var resolver = eventFlowOptions
                               .UseInMemoryReadStoreFor <InMemoryTestAggregateReadModel>()
                               .UseFilesEventStore(FilesEventStoreConfiguration.Create(storePath))
                               .CreateResolver();

                _configuration      = resolver.Resolve <IFilesEventStoreConfiguration>();
                _readModelPopulator = resolver.Resolve <IReadModelPopulator>();
                _queryProcessor     = resolver.Resolve <IQueryProcessor>();

                return(resolver);
            }
        public override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions)
        {
            var connectionSettings = ConnectionSettings.Create()
                                     .EnableVerboseLogging()
                                     .KeepReconnecting()
                                     .SetDefaultUserCredentials(new UserCredentials("admin", "changeit"))
                                     .Build();

            var resolver = eventFlowOptions
                           .UseInMemoryReadStoreFor <InMemoryTestAggregateReadModel>()
                           .AddMetadataProvider <AddGuidMetadataProvider>()
                           .UseEventStoreEventStore(new IPEndPoint(IPAddress.Loopback, 1113), connectionSettings)
                           .CreateResolver();

            _queryProcessor     = resolver.Resolve <IQueryProcessor>();
            _readModelPopulator = resolver.Resolve <IReadModelPopulator>();

            return(resolver);
        }
Example #6
0
 private void RegisterReadStores(IEventFlowOptions eventFlowOptions)
 {
     eventFlowOptions.UseInMemoryReadStoreFor <TestReadModel>();
 }
Example #7
0
 public static IEventFlowOptions ConfigureSzlemSchoolManagement(this IEventFlowOptions options)
 {
     return(options
            .UseInMemoryReadStoreFor <SchoolReadModel>());
 }