47 references to StartupLoader
Microsoft.AspNetCore.Hosting (9)
GenericHost\GenericWebHostBuilder.cs (5)
102var startupType = StartupLoader.FindStartupType(webHostOptions.StartupAssembly!, webhostContext.HostingEnvironment.EnvironmentName); 230if (StartupLoader.HasConfigureServicesIServiceProviderDelegate(startupType, context.HostingEnvironment.EnvironmentName)) 239var configureServicesBuilder = StartupLoader.FindConfigureServicesDelegate(startupType, context.HostingEnvironment.EnvironmentName); 246var configureContainerBuilder = StartupLoader.FindConfigureContainerDelegate(startupType, context.HostingEnvironment.EnvironmentName); 256configureBuilder = StartupLoader.FindConfigureDelegate(startupType, context.HostingEnvironment.EnvironmentName);
WebHostBuilder.cs (2)
318var startupType = StartupLoader.FindStartupType(startupAssemblyName, _hostingEnvironment.EnvironmentName); 332var methods = StartupLoader.LoadMethods(serviceProvider, startupType, hostingEnvironment.EnvironmentName);
WebHostBuilderExtensions.cs (2)
122return new ConventionBasedStartup(StartupLoader.LoadMethods(serviceProvider, instance.GetType(), hostingEnvironment.EnvironmentName, instance)); 159return new ConventionBasedStartup(StartupLoader.LoadMethods(sp, startupType, hostingEnvironment.EnvironmentName));
Microsoft.AspNetCore.Hosting.Tests (38)
StartupManagerTests.cs (38)
28var startup = StartupLoader.LoadMethods(services, type, ""); 50var startup = StartupLoader.LoadMethods(services, type, ""); 71var startup = StartupLoader.LoadMethods(services, type, ""); 96var startup = StartupLoader.LoadMethods(services, type, ""); 118var startup = StartupLoader.LoadMethods(services, type, ""); 140var startup = StartupLoader.LoadMethods(services, type, ""); 297var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "WithServices"); 298var startup = StartupLoader.LoadMethods(services, type, "WithServices"); 319var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "WithScopedServices"); 320var startup = StartupLoader.LoadMethods(services, type, "WithScopedServices"); 346var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", environment); 347var startup = StartupLoader.LoadMethods(services, type, environment); 366var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "Boom"); 367var ex = Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, type, "Boom")); 378var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", environment); 393var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", environment); 394var startup = StartupLoader.LoadMethods(services, type, environment); 414var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "TwoConfigures"); 416var ex = Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, type, "TwoConfigures")); 429var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "PrivateConfigure"); 431var ex = Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, type, "PrivateConfigure")); 443var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "TwoConfigureServices"); 445var ex = Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, type, "TwoConfigureServices")); 456var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "WithNullConfigureServices"); 457var startup = StartupLoader.LoadMethods(services, type, "WithNullConfigureServices"); 473var type = StartupLoader.FindStartupType("Microsoft.AspNetCore.Hosting.Tests", "WithConfigureServices"); 474var startup = StartupLoader.LoadMethods(services, type, "WithConfigureServices"); 492var startup = StartupLoader.LoadMethods(services, typeof(TestStartup), hostingEnv.EnvironmentName); 509var startup = StartupLoader.LoadMethods(services, typeof(TestStartup), "No"); 524var startup = StartupLoader.LoadMethods(services, typeof(StartupConfigureServicesThrows), environmentName: null); 538var startup = StartupLoader.LoadMethods(services, typeof(StartupConfigureThrows), environmentName: null); 553var startup = StartupLoader.LoadMethods(services, typeof(MyContainerStartup), Environments.Development); 569var startup = StartupLoader.LoadMethods(services, typeof(MyContainerStartupBaseClass), Environments.Development); 585var startup = StartupLoader.LoadMethods(services, typeof(MyContainerStartupEnvironmentBased), Environments.Production); 600var startup = StartupLoader.LoadMethods(services, typeof(MyContainerStartup), Environments.Development); 611Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, typeof(MyContainerStartupBaseClass), Environments.Development)); 621Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, typeof(MyContainerStartupWithOverloads), Environments.Development)); 631var startup = StartupLoader.LoadMethods(services, typeof(MyContainerStartup), Environments.Development);