4 instantiations of Service
Microsoft.AspNetCore.Tests (4)
WebApplicationTests.cs (4)
1817
Assert.Throws<InvalidOperationException>(() => builder.Services.AddSingleton<IService>(new
Service
()));
1818
Assert.Throws<InvalidOperationException>(() => builder.Services.TryAddSingleton(new
Service
()));
1821
Assert.Throws<InvalidOperationException>(() => builder.Services.Remove(ServiceDescriptor.Singleton(new
Service
())));
1822
Assert.Throws<InvalidOperationException>(() => builder.Services[0] = ServiceDescriptor.Singleton(new
Service
()));
8 references to Service
Microsoft.AspNetCore.Tests (8)
WebApplicationTests.cs (8)
1497
services.AddSingleton<IService,
Service
>();
1512
Assert.IsType<
Service
>(service0);
1513
Assert.IsType<
Service
>(service1);
1789
builder.Services.AddScoped<
Service
>();
1803
builder.Services.AddScoped<
Service
>();
1819
Assert.Throws<InvalidOperationException>(() => builder.Services.AddScoped<IService,
Service
>());
1820
Assert.Throws<InvalidOperationException>(() => builder.Services.TryAddScoped<IService,
Service
>());
2951
public Service2(
Service
service)