Ejemplo n.º 1
0
 public Action <IApplicationBuilder> Configure(Action <IApplicationBuilder> next)
 {
     return(app =>
     {
         _runner.Configure(app, _configuration, _hostingEnvironment);
         _runner.RunApplicationInitializers(app.ApplicationServices).GetAwaiter().GetResult();
         next(app);
     });
 }
Ejemplo n.º 2
0
    public async Task RunsApplicationInitializers()
    {
        // Arrange
        var options = new StartupModulesOptions();

        options.ApplicationInitializers.Add(typeof(MyAppInitializer));
        var runner = new StartupModuleRunner(options);

        // Act
        await runner.RunApplicationInitializers(new ServiceCollection().BuildServiceProvider());

        // Assert
        // wat do ¯\_(ツ)_/¯
    }