Esempio 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);
     });
 }
Esempio n. 2
0
    public void Configures()
    {
        // Arrange
        var options       = new StartupModulesOptions();
        var startupModule = new MyStartupModule();

        options.AddStartupModule(startupModule);
        var runner = new StartupModuleRunner(options);

        // Act
        runner.Configure(new ApplicationBuilder(new ServiceCollection().BuildServiceProvider()), null, null);

        // Assert
        Assert.True(startupModule.Configured);
    }