internal IntegrationAppLifetime(IntegrationAppHost host, IntegrationApp app, IApplicationLifetime lifetimeService)
        {
            _app = app;

            host.SetApp(app);
            host.SetLifetimeService(lifetimeService);
        }
Example #2
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);
Example #3
0
 static IEnumerable <Type> GetAreaTypes(this IntegrationAppHost host) =>
 host.TestType.GetNestedTypes(BindingFlags.Public | BindingFlags.NonPublic);
Example #4
0
 static void ConfigureIntegrationApp(this IConfigurationBuilder builder, IntegrationAppHost host) =>
 builder
 .AddJsonFile("appsettings.json")
 .AddUserSecrets(host.TestType.Assembly);
Example #5
0
 internal static IHostBuilder ConfigureIntegrationApp(this IHostBuilder builder, IntegrationAppHost host) =>
 builder
 .ConfigureAppConfiguration(configuration => configuration.ConfigureIntegrationApp(host))
 .ConfigureServices(services => services.AddIntegrationApp(host));