public static IEventFlowOptions ConfigureMongoDb( this IEventFlowOptions eventFlowOptions, string database) { var mongoClient = new MongoClient(); return(eventFlowOptions .ConfigureMongoDb(mongoClient, database)); }
public static IEventFlowOptions ConfigureMongoDb( this IEventFlowOptions eventFlowOptions, IMongoClient mongoClient, string database) { IMongoDatabase mongoDatabase = mongoClient.GetDatabase(database); return(eventFlowOptions.ConfigureMongoDb(() => mongoDatabase)); }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { var resolver = eventFlowOptions .ConfigureMongoDb(_runner.ConnectionString, "eventflow") .UseEventStore <MongoDbEventPersistence>() .CreateResolver(); return(resolver); }
public void Register(IEventFlowOptions eventFlowOptions) { // TODO: read form config var client = new MongoClient("mongodb://localhost:27017"); eventFlowOptions .ConfigureMongoDb(client, "restairline-flight-availability-events") .UseMongoDbEventStore() .UseMongoDbSnapshotStore(); }
private static IEventFlowOptions ConfigureMongoDb( this IEventFlowOptions eventFlowOptions, string url, string database) { MongoUrl mongoUrl = new MongoUrl(url); var mongoClient = new MongoClient(mongoUrl); return(eventFlowOptions .ConfigureMongoDb(mongoClient, database)); }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { _runner = MongoDbRunner.Start(); var resolver = eventFlowOptions .ConfigureMongoDb(_runner.ConnectionString, "eventflow") .UseMongoDbSnapshotStore() .CreateResolver(); return(resolver); }
protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) { _runner = MongoDbRunner.Start(); var resolver = eventFlowOptions .ConfigureMongoDb(_runner.ConnectionString, "eventflow") .UseMongoDbEventStore() .CreateResolver(); var eventPersistenceInitializer = resolver.Resolve <IMongoDbEventPersistenceInitializer>(); eventPersistenceInitializer.Initialize(); return(resolver); }