protected StartupBase() { serviceCollection = new ServiceCollection(); containerCollection = new ContainerCollection(); var env = new HostEnvironment(); var app = new ApplicationBuilder(); serviceCollection.AddSingleton(app); serviceCollection.AddSingleton(containerCollection); serviceCollection.AddSingleton <IHostEnvironment>(env); containerCollection.RegisterSubContainer <ServiceResolverContainer>(); ConfigureSubContainers(containerCollection); BaseConfigureServices(serviceCollection); ConfigureServices(serviceCollection); containerCollection.ConfigureServices(serviceCollection); app.ApplicationServices = serviceCollection.BuildServiceProvider(); BaseConfigure(app, env); Configure(app, env); containerCollection.Configure(app, env); }
protected abstract void ConfigureSubContainers(IContainerCollection containerCollection);
protected override void ConfigureSubContainers(IContainerCollection containerCollection) { }