2 instantiations of MyContainer
Microsoft.AspNetCore.Hosting.Tests (2)
Internal\MyBadContainerFactory.cs (1)
12
var container = new
MyContainer
();
Internal\MyContainerFactory.cs (1)
12
var container = new
MyContainer
();
40 references to MyContainer
Microsoft.AspNetCore.Hosting.Tests (40)
Internal\MyBadContainerFactory.cs (4)
8
public class MyBadContainerFactory : IServiceProviderFactory<
MyContainer
>
10
public
MyContainer
CreateBuilder(IServiceCollection services)
12
var
container = new MyContainer();
17
public IServiceProvider CreateServiceProvider(
MyContainer
containerBuilder)
Internal\MyContainerFactory.cs (4)
8
public class MyContainerFactory : IServiceProviderFactory<
MyContainer
>
10
public
MyContainer
CreateBuilder(IServiceCollection services)
12
var
container = new MyContainer();
17
public IServiceProvider CreateServiceProvider(
MyContainer
containerBuilder)
StartupManagerTests.cs (32)
88
serviceCollection.AddSingleton<IServiceProviderFactory<
MyContainer
>, MyContainerFactory>();
90
serviceCollection.AddSingleton<IStartupConfigureContainerFilter<
MyContainer
>>(new TestConfigureContainerFilter(1, overrideAfterService: true));
91
serviceCollection.AddSingleton<IStartupConfigureContainerFilter<
MyContainer
>>(new TestConfigureContainerFilter(2, overrideAfterService: true));
110
serviceCollection.AddSingleton<IServiceProviderFactory<
MyContainer
>, MyContainerFactory>();
112
serviceCollection.AddSingleton<IStartupConfigureContainerFilter<
MyContainer
>>(new TestConfigureContainerFilter(1, overrideAfterService: false));
113
serviceCollection.AddSingleton<IStartupConfigureContainerFilter<
MyContainer
>>(new TestConfigureContainerFilter(2, overrideAfterService: true));
132
serviceCollection.AddSingleton<IServiceProviderFactory<
MyContainer
>, MyContainerFactory>();
135
serviceCollection.AddSingleton<IStartupConfigureContainerFilter<
MyContainer
>>(new TestConfigureContainerFilter(2, overrideAfterService: true));
152
public void ConfigureContainer(
MyContainer
services)
171
public void ConfigureContainer(
MyContainer
services)
183
public class TestConfigureContainerFilter : IStartupConfigureContainerFilter<
MyContainer
>
195
public Action<
MyContainer
> ConfigureContainer(Action<
MyContainer
> next)
550
serviceCollection.AddSingleton<IServiceProviderFactory<
MyContainer
>, MyContainerFactory>();
558
Assert.IsType<
MyContainer
>(app.ApplicationServices);
559
Assert.True(((
MyContainer
)app.ApplicationServices).FancyMethodCalled);
566
serviceCollection.AddSingleton<IServiceProviderFactory<
MyContainer
>, MyContainerFactory>();
574
Assert.IsType<
MyContainer
>(app.ApplicationServices);
575
Assert.True(((
MyContainer
)app.ApplicationServices).FancyMethodCalled);
582
serviceCollection.AddSingleton<IServiceProviderFactory<
MyContainer
>, MyContainerFactory>();
590
Assert.IsType<
MyContainer
>(app.ApplicationServices);
591
Assert.Equal(((
MyContainer
)app.ApplicationServices).Environment, Environments.Production);
618
serviceCollection.AddSingleton<IServiceProviderFactory<
MyContainer
>, MyContainerFactory>();
628
serviceCollection.AddSingleton<IServiceProviderFactory<
MyContainer
>, MyBadContainerFactory>();
637
Assert.IsNotType<
MyContainer
>(app.ApplicationServices);
647
public void ConfigureContainer(
MyContainer
container)
670
public void ConfigureDevelopmentContainer(
MyContainer
container)
675
public void ConfigureProductionContainer(
MyContainer
container)
693
public void ConfigureContainer(
MyContainer
container)
704
public class MyContainerStartupBaseClass : StartupBase<
MyContainer
>
706
public MyContainerStartupBaseClass(IServiceProviderFactory<
MyContainer
> factory) : base(factory)
715
public override void ConfigureContainer(
MyContainer
containerBuilder)