41 references to AddSingleton
DependencyInjectionApp (1)
Program.cs (1)
21services.AddSingleton(typeof(IService<>), typeof(Service<>));
HtmlGenerationWebSite (1)
Startup.cs (1)
20services.AddSingleton(typeof(ISignalTokenProviderService<>), typeof(SignalTokenProviderService<>));
Microsoft.AspNetCore.AsyncState (1)
AsyncStateHttpContextExtensions.cs (1)
31.AddSingleton(typeof(IAsyncContext<>), typeof(AsyncContextHttpContext<>));
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
Infrastructure\TestHelpers.cs (1)
24serviceCollection.AddSingleton(typeof(IGrpcInterceptorActivator<>), typeof(TestInterceptorActivator<>));
Microsoft.AspNetCore.Hosting (2)
WebHostBuilder.cs (1)
322services.AddSingleton(typeof(IStartup), startupType);
WebHostBuilderExtensions.cs (1)
152services.AddSingleton(typeof(IStartup), startupType);
Microsoft.AspNetCore.Http.Results.Tests (15)
ChallengeResultTests.cs (1)
67services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
ContentResultTests.cs (1)
173services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
FileContentResultTests.cs (1)
30.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>))
ForbidResultTests.cs (1)
134services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
NoContentResultTests.cs (1)
93services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
RedirectToRouteResultTests.cs (1)
113services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
ResultsOfTTests.cs (1)
57services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
SignInResultTests.cs (1)
101services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
SignOutResultTests.cs (1)
100services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
src\Shared\ResultsTests\FileStreamResultTestBase.cs (1)
444services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
462services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (1)
493services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
StatusCodeResultTests.cs (1)
50services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
UnauthorizedResultTests.cs (1)
60services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
Utf8ContentResultTests.cs (1)
91services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
Microsoft.AspNetCore.Mvc.Core.Test (3)
src\Shared\ResultsTests\FileStreamResultTestBase.cs (1)
444services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
462services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (1)
493services.AddSingleton(typeof(ILogger<>), typeof(NullLogger<>));
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
RedisDependencyInjectionExtensions.cs (1)
48signalrBuilder.Services.AddSingleton(typeof(HubLifetimeManager<>), typeof(RedisHubLifetimeManager<>));
Microsoft.AspNetCore.SignalR.Tests (12)
AddSignalRTests.cs (6)
30serviceCollection.AddSingleton(typeof(HubLifetimeManager<>), typeof(CustomHubLifetimeManager<>)); 33serviceCollection.AddSingleton(typeof(IHubContext<>), typeof(CustomHubContext<>)); 34serviceCollection.AddSingleton(typeof(IHubContext<,>), typeof(CustomHubContext<,>)); 58serviceCollection.AddSingleton(typeof(HubLifetimeManager<>), typeof(CustomHubLifetimeManager<>)); 61serviceCollection.AddSingleton(typeof(IHubContext<>), typeof(CustomHubContext<>)); 62serviceCollection.AddSingleton(typeof(IHubContext<,>), typeof(CustomHubContext<,>));
HubConnectionHandlerTests.cs (6)
3216builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 3251builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 3286builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 3505builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 4054builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>)); 4092builder.AddSingleton(typeof(IHubActivator<>), typeof(CustomHubActivator<>));
Microsoft.Extensions.DependencyInjection.Abstractions (2)
ServiceCollectionServiceExtensions.cs (2)
359return services.AddSingleton(typeof(TService), typeof(TImplementation)); 377return services.AddSingleton(serviceType, serviceType);
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
AutoActivationExtensions.cs (1)
219.AddSingleton(serviceType, implementationType)
SocialWeather (1)
Startup.cs (1)
16services.AddSingleton(typeof(JsonStreamFormatter<>), typeof(JsonStreamFormatter<>));