8 instantiations of AnotherFakeService
Microsoft.Extensions.DependencyInjection.AutoActivation.Tests (8)
AcceptanceTest.cs (4)
179.AddActivatedSingleton(sp => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!))) 198.AddActivatedSingleton(typeof(AnotherFakeService), sp => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!))) 236services.TryAddActivatedSingleton(typeof(AnotherFakeService), sp => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!)); 260services.TryAddActivatedSingleton(sp => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!));
AcceptanceTest.Keyed.cs (4)
165.AddActivatedKeyedSingleton(serviceKey, (sp, _) => new AnotherFakeService(sp.GetRequiredService<IAnotherFakeServiceCounter>()))) 185.AddActivatedKeyedSingleton(typeof(AnotherFakeService), serviceKey, (sp, _) => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!))) 225services.TryAddActivatedKeyedSingleton(typeof(AnotherFakeService), serviceKey, (sp, _) => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!)); 250services.TryAddActivatedKeyedSingleton(serviceKey, (sp, _) => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!));
18 references to AnotherFakeService
Microsoft.Extensions.DependencyInjection.AutoActivation.Tests (18)
AcceptanceTest.cs (9)
113.AddActivatedSingleton(typeof(IFakeService), typeof(AnotherFakeService))) 138.AddActivatedSingleton<IFakeService, AnotherFakeService>()) 160.AddActivatedSingleton<IFakeService, AnotherFakeService>()) 198.AddActivatedSingleton(typeof(AnotherFakeService), sp => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!))) 234.AddSingleton<AnotherFakeService>(); 236services.TryAddActivatedSingleton(typeof(AnotherFakeService), sp => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!)); 258.AddSingleton<AnotherFakeService>(); 282services.TryAddActivatedSingleton(typeof(IFakeService), typeof(AnotherFakeService)); 304services.TryAddActivatedSingleton<IFakeService, AnotherFakeService>();
AcceptanceTest.Keyed.cs (9)
96.AddActivatedKeyedSingleton(typeof(IFakeService), serviceKey, typeof(AnotherFakeService))) 122.AddActivatedKeyedSingleton<IFakeService, AnotherFakeService>(serviceKey)) 145.AddActivatedKeyedSingleton<IFakeService, AnotherFakeService>(serviceKey)) 185.AddActivatedKeyedSingleton(typeof(AnotherFakeService), serviceKey, (sp, _) => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!))) 223.AddKeyedSingleton<AnotherFakeService>(serviceKey); 225services.TryAddActivatedKeyedSingleton(typeof(AnotherFakeService), serviceKey, (sp, _) => new AnotherFakeService(sp.GetService<IAnotherFakeServiceCounter>()!)); 248.AddKeyedSingleton<AnotherFakeService>(serviceKey); 273services.TryAddActivatedKeyedSingleton(typeof(IFakeService), serviceKey, typeof(AnotherFakeService)); 296services.TryAddActivatedKeyedSingleton<IFakeService, AnotherFakeService>(serviceKey);