Example #1
0
 static void AddIntegrationApp(this IServiceCollection services, IntegrationAppHost host) =>
 services
 .AddTotemRuntime()
 .AddTimeline(timeline => timeline.AddEventStore().BindOptionsToConfiguration())
 .ConfigureArea(host.GetAreaTypes())
 .ConfigureEventStorePorts()
 .AddEventStoreProcess()
 .AddSingleton <IClientDb, ClientDb>()
 .AddSingleton <IntegrationApp>()
 .AddSingleton <IHostLifetime>(p => new IntegrationAppLifetime(
                                   host,
                                   p.GetService <IntegrationApp>(),
                                   p.GetService <IApplicationLifetime>()))
 .Add(host.AppServices);