public static void AddEventStore(this IServiceCollection services, Action <EventStoreOptions> configure = null)
        {
            var options = new EventStoreOptions();

            configure?.Invoke(options);

            services.AddSingleton(options);
            services.AddAWSService <IAmazonDynamoDB>(options);
            services.AddSingleton <IEventStoreConfiguration, EventStoreConfiguration>();
            services.AddAsyncInitializer <EventStoreInitializer>();
            services.AddSingleton <ICelebrityEventStore, DynamoDbEventStore>();
        }
Beispiel #2
0
 public EventStoreConfiguration(IAmazonDynamoDB dynamoDb, EventStoreOptions options)
 {
     _dynamoDb = dynamoDb;
     Options   = options;
 }