public static IEventStoreTimelineClientBuilder AddEventStore(this ITimelineClientBuilder client) { client.ConfigureServices(services => services .AddSingleton <ILogger, EventStoreLogAdapter>() .AddSingleton(p => new EventStoreContext( p.BuildConnection(), p.GetRequiredService <IJsonFormat>(), p.GetRequiredService <AreaMap>())) .AddSingleton <IClientDb, ClientDb>()); return(new EventStoreTimelineClientBuilder(client)); }
internal void ConfigureTimeline(WebHostBuilderContext context, ITimelineClientBuilder timeline) => _timeline?.Invoke(context, timeline);
internal EventStoreTimelineClientBuilder(ITimelineClientBuilder client) { _client = client; }