Exemple #1
0
        protected override IServiceProvider Configure(IEventFlowOptions eventFlowOptions)
        {
            var storePath = Path.Combine(
                Path.GetTempPath(),
                Guid.NewGuid().ToString());

            Directory.CreateDirectory(storePath);

            var serviceProvider = eventFlowOptions
                                  .UseFilesEventPersistence(FilesEventStoreConfiguration.Create(storePath))
                                  .ServiceCollection.BuildServiceProvider();

            _configuration = serviceProvider.GetRequiredService <IFilesEventStoreConfiguration>();

            return(serviceProvider);
        }