public override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { var resolver = eventFlowOptions .UseInMemoryReadStoreFor<InMemoryTestAggregateReadModel>() .CreateResolver(); _readModelPopulator = resolver.Resolve<IReadModelPopulator>(); _queryProcessor = resolver.Resolve<IQueryProcessor>(); return resolver; }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { var resolver = eventFlowOptions .RegisterServices(sr => sr.RegisterType(typeof(ThingyMessageLocator))) .UseInMemoryReadStoreFor<InMemoryThingyReadModel>() .UseInMemoryReadStoreFor<InMemoryThingyMessageReadModel, ThingyMessageLocator>() .AddQueryHandlers( typeof(InMemoryThingyGetQueryHandler), typeof(InMemoryThingyGetVersionQueryHandler), typeof(InMemoryThingyGetMessagesQueryHandler)) .CreateResolver(); return resolver; }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { _testDatabase = MsSqlHelpz.CreateDatabase("eventflow"); var resolver = eventFlowOptions .ConfigureMsSql(MsSqlConfiguration.New.SetConnectionString(_testDatabase.ConnectionString.Value)) .UseEventStore<MsSqlEventPersistence>() .CreateResolver(); var databaseMigrator = resolver.Resolve<IMsSqlDatabaseMigrator>(); EventFlowEventStoresMsSql.MigrateDatabase(databaseMigrator); databaseMigrator.MigrateDatabaseUsingEmbeddedScripts(GetType().Assembly); return resolver; }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { var connectionSettings = ConnectionSettings.Create() .EnableVerboseLogging() .KeepReconnecting() .SetDefaultUserCredentials(new UserCredentials("admin", "changeit")) .Build(); var resolver = eventFlowOptions .AddMetadataProvider<AddGuidMetadataProvider>() .UseEventStoreEventStore(new IPEndPoint(IPAddress.Loopback, 1113), connectionSettings) .CreateResolver(); return resolver; }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { var storePath = Path.Combine( Path.GetTempPath(), Guid.NewGuid().ToString()); Directory.CreateDirectory(storePath); var resolver = eventFlowOptions .UseFilesEventStore(FilesEventStoreConfiguration.Create(storePath)) .CreateResolver(); _configuration = resolver.Resolve<IFilesEventStoreConfiguration>(); 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; }
public override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { TestDatabase = MsSqlHelpz.CreateDatabase("eventflow"); var resolver = eventFlowOptions .ConfigureMsSql(MsSqlConfiguration.New.SetConnectionString(TestDatabase.ConnectionString.Value)) .UseEventStore<MsSqlEventPersistence>() .UseMssqlReadModel<MsSqlTestAggregateReadModel>() .CreateResolver(); MsSqlConnection = resolver.Resolve<IMsSqlConnection>(); ReadModelSqlGenerator = resolver.Resolve<IReadModelSqlGenerator>(); ReadModelPopulator = resolver.Resolve<IReadModelPopulator>(); var databaseMigrator = resolver.Resolve<IMsSqlDatabaseMigrator>(); EventFlowEventStoresMsSql.MigrateDatabase(databaseMigrator); databaseMigrator.MigrateDatabaseUsingEmbeddedScripts(GetType().Assembly); return resolver; }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { _testDatabase = MsSqlHelpz.CreateDatabase("eventflow"); var resolver = eventFlowOptions .RegisterServices(sr => sr.RegisterType(typeof (ThingyMessageLocator))) .ConfigureMsSql(MsSqlConfiguration.New.SetConnectionString(_testDatabase.ConnectionString.Value)) .UseMssqlReadModel<MsSqlThingyReadModel>() .UseMssqlReadModel<MsSqlThingyMessageReadModel, ThingyMessageLocator>() .AddQueryHandlers( typeof(MsSqlThingyGetQueryHandler), typeof(MsSqlThingyGetVersionQueryHandler), typeof(MsSqlThingyGetMessagesQueryHandler)) .CreateResolver(); var databaseMigrator = resolver.Resolve<IMsSqlDatabaseMigrator>(); EventFlowEventStoresMsSql.MigrateDatabase(databaseMigrator); databaseMigrator.MigrateDatabaseUsingEmbeddedScripts(GetType().Assembly); return resolver; }
public override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { // Disable SSL certificate validation ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; var url = Environment.GetEnvironmentVariable("ELASTICSEARCH_URL"); if (string.IsNullOrEmpty(url)) { Assert.Inconclusive("The environment variabel named 'ELASTICSEARCH_URL' isn't set. Set it to e.g. 'http://localhost:9200'"); } _resolver = eventFlowOptions .ConfigureElasticsearch(new Uri(url)) .UseElasticsearchReadModel<ElasticsearchTestAggregateReadModel>() .CreateResolver(); _elasticClient = _resolver.Resolve<IElasticClient>(); _readModelPopulator = _resolver.Resolve<IReadModelPopulator>(); _readModelDescriptionProvider = _resolver.Resolve<IReadModelDescriptionProvider>(); _readModelStore = _resolver.Resolve<IElasticsearchReadModelStore<ElasticsearchTestAggregateReadModel>>(); return _resolver; }
public static IEventFlowOptions AddAspNetCoreMetadataProviders( this IEventFlowOptions eventFlowOptions) { return(eventFlowOptions.AddAspNetCore()); }
public static IEventFlowOptions UseEventStoreEventStore( this IEventFlowOptions eventFlowOptions) { return(eventFlowOptions.UseEventStore <EventStoreEventPersistence>()); }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { return eventFlowOptions.CreateResolver(); }
public void Register(IEventFlowOptions eventFlowOptions) { eventFlowOptions.AddDefaults(typeof(DomainModule).Assembly); }
public static IEventFlowOptions AddQueryHandlers( this IEventFlowOptions eventFlowOptions, params Type[] queryHandlerTypes) { return(eventFlowOptions.AddQueryHandlers((IEnumerable <Type>)queryHandlerTypes)); }
public static IEventFlowOptions RegisterModules(this IEventFlowOptions eventFlowOptions) { eventFlowOptions.RegisterModule(new TestModule()); return(eventFlowOptions); }
protected override IServiceProvider Configure(IEventFlowOptions eventFlowOptions) { return(eventFlowOptions .UseInMemorySnapshotPersistence() .ServiceCollection.BuildServiceProvider()); }
protected override IEventFlowOptions Options(IEventFlowOptions eventFlowOptions) { return(base.Options(eventFlowOptions .UseAutofacContainerBuilder())); }
public static IEventFlowOptions UseConsoleLog( this IEventFlowOptions eventFlowOptions) { return(eventFlowOptions.RegisterServices(sr => sr.Register <ILog, ConsoleLog>())); }
public static IEventFlowOptions AddCommands( this IEventFlowOptions eventFlowOptions, params Type[] commandTypes) { return(eventFlowOptions.AddCommands(commandTypes)); }
public static IEventFlowOptions UsePermanentMemoryCache( this IEventFlowOptions eventFlowOptions) { return(eventFlowOptions.RegisterServices(r => r.Register <IMemoryCache, DictionaryMemoryCache>(Lifetime.Singleton))); }
public void Register(IEventFlowOptions eventFlowOptions) { // Use explicit adding of types, no need to scan assembly eventFlowOptions.AddJobs( typeof(PublishCommandJob), typeof(DispatchToAsynchronousEventSubscribersJob)); }
public void Register(IEventFlowOptions eventFlowOptions) { eventFlowOptions.AddDefaults(typeof(UserModule).Assembly); eventFlowOptions.AddDefaults(typeof(UserCreatedEvent).Assembly); }
public static IEventFlowOptions AddOwinMetadataProviders( this IEventFlowOptions eventFlowOptions) { return(eventFlowOptions .AddMetadataProviders(EventFlowOwin.Assembly)); }
public static IEventFlowOptions AddSubscribers( this IEventFlowOptions eventFlowOptions, params Type[] subscribeSynchronousToTypes) { return(eventFlowOptions.AddSubscribers((IEnumerable <Type>)subscribeSynchronousToTypes)); }
public static IEventFlowOptions AddJobs( this IEventFlowOptions eventFlowOptions, params Type[] jobTypes) { return(eventFlowOptions.AddJobs(jobTypes)); }
public static IEventFlowOptions UseHandfireJobScheduler( this IEventFlowOptions eventFlowOptions) { return(eventFlowOptions.UseHangfireJobScheduler()); }
public abstract IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions);
public static IEventFlowOptions UsePostgreSqlSnapshotStore( this IEventFlowOptions eventFlowOptions) { return(eventFlowOptions .UseSnapshotStore <PostgreSqlSnapshotPersistence>()); }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { return(eventFlowOptions .UseInMemorySnapshotStore() .CreateResolver()); }
public static IEventFlowOptions AddAggregateRoots( this IEventFlowOptions eventFlowOptions, params Type[] aggregateRootTypes) { return(eventFlowOptions); }
public static IEventFlowOptions AddAggregateRoots( this IEventFlowOptions eventFlowOptions, IEnumerable <Type> aggregateRootTypes) { return(eventFlowOptions); }
public static IEventFlowOptions ConfigureBookingCommandHandlers(this IEventFlowOptions eventFlowOptions) { return(eventFlowOptions .AddDefaults(Assembly)); }
public static IEventFlowOptions UseMongoDbEventStore(this IEventFlowOptions eventFlowOptions) { return(eventFlowOptions.UseEventStore <MongoDbEventPersistence>() .RegisterServices(f => f.Register <IMongoDbEventPersistenceInitializer, MongoDbEventPersistenceInitializer>())); }
public static IEventFlowOptions UseAWSSnapshotStore(this IEventFlowOptions eventFlowOptions) { return(eventFlowOptions.UseSnapshotStore <DynamoDBSnapshotStore>()); }
public void Register(IEventFlowOptions eventFlowOptions) { eventFlowOptions.AddDefaults(typeof(EntityFrameworkQueryHandlersModule).Assembly); }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { return(eventFlowOptions.CreateResolver()); }
public ModuleRegistration( IEventFlowOptions eventFlowOptions) { _eventFlowOptions = eventFlowOptions; }
public static IEventFlowOptions AddCommandHandlers( this IEventFlowOptions eventFlowOptions, params Type[] commandHandlerTypes) { return(eventFlowOptions.AddCommandHandlers((IEnumerable <Type>)commandHandlerTypes)); }
public void Register(IEventFlowOptions eventFlowOptions) { eventFlowOptions.AddQueryHandlers(typeof(ElasticsearchQueryHandlersModule).Assembly); }
public void Register(IEventFlowOptions eventFlowOptions) { // Use explicite adding of types, no need to scan assembly eventFlowOptions.AddJobs( typeof (PublishCommandJob)); }
protected virtual IEventFlowOptions Options(IEventFlowOptions eventFlowOptions) { return(eventFlowOptions); }
protected abstract IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions);