383 references to AddSingleton
ApiExplorerWebSite (1)
Aspire.Components.Common.Tests (2)
Aspire.Dashboard (3)
Aspire.Dashboard.Components.Tests (44)
Aspire.Dashboard.Tests (1)
Aspire.Hosting (4)
Aspire.Hosting.Tests (6)
BasicTestApp (1)
BasicWebSite (4)
ClientSample (1)
Cookies (1)
CookieSessionSample (1)
CustomPolicyProvider (2)
GenericHostWebSite (1)
HostedBlazorWebassemblyApp.Server (1)
http2cat (1)
Identity.DefaultUI.WebSite (2)
Identity.ExternalClaims (1)
IIS.FunctionalTests (1)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IISExpress.FunctionalTests (1)
InMemory.FunctionalTests (4)
InProcessWebSite (1)
IStartupInjectionAssemblyName (1)
Microsoft.AspNetCore.Authentication.Certificate (1)
Microsoft.AspNetCore.Authentication.Core.Test (1)
Microsoft.AspNetCore.Authentication.Test (1)
Microsoft.AspNetCore.Authorization.Test (8)
Microsoft.AspNetCore.Components.Authorization.Tests (2)
Microsoft.AspNetCore.Components.Endpoints.Tests (10)
Microsoft.AspNetCore.Components.Tests (2)
Microsoft.AspNetCore.Components.Web.Tests (4)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.ConcurrencyLimiter (2)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.Diagnostics.Tests (7)
Microsoft.AspNetCore.Grpc.Swagger.Tests (3)
Microsoft.AspNetCore.HeaderParsing (2)
Microsoft.AspNetCore.Hosting (2)
Microsoft.AspNetCore.Hosting.Tests (31)
StartupManagerTests.cs (24)
20serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
42serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
64serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
88serviceCollection.AddSingleton<IServiceProviderFactory<MyContainer>, MyContainerFactory>();
110serviceCollection.AddSingleton<IServiceProviderFactory<MyContainer>, MyContainerFactory>();
132serviceCollection.AddSingleton<IServiceProviderFactory<MyContainer>, MyContainerFactory>();
293serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
344.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>()
363serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
391.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>()
410serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
424serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
439serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
453serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
470serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
488serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
506serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
521serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
535serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
550serviceCollection.AddSingleton<IServiceProviderFactory<MyContainer>, MyContainerFactory>();
566serviceCollection.AddSingleton<IServiceProviderFactory<MyContainer>, MyContainerFactory>();
582serviceCollection.AddSingleton<IServiceProviderFactory<MyContainer>, MyContainerFactory>();
618serviceCollection.AddSingleton<IServiceProviderFactory<MyContainer>, MyContainerFactory>();
628serviceCollection.AddSingleton<IServiceProviderFactory<MyContainer>, MyBadContainerFactory>();
Microsoft.AspNetCore.Http.Connections.Tests (2)
Microsoft.AspNetCore.Http.Results.Tests (18)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Identity.InMemory.Test (4)
Microsoft.AspNetCore.Identity.Specification.Tests (2)
Microsoft.AspNetCore.Mvc.Core.Test (17)
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
Microsoft.AspNetCore.Mvc.RazorPages.Test (3)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (16)
ViewComponentResultTest.cs (14)
666services.AddSingleton<IViewComponentSelector, DefaultViewComponentSelector>();
667services.AddSingleton<IViewComponentDescriptorCollectionProvider, DefaultViewComponentDescriptorCollectionProvider>();
668services.AddSingleton<IViewComponentInvokerFactory, DefaultViewComponentInvokerFactory>();
669services.AddSingleton<ITypeActivatorCache, TypeActivatorCache>();
670services.AddSingleton<IViewComponentActivator, DefaultViewComponentActivator>();
671services.AddSingleton<IViewComponentFactory, DefaultViewComponentFactory>();
673services.AddSingleton<IModelMetadataProvider, EmptyModelMetadataProvider>();
675services.AddSingleton<ITempDataDictionaryFactory, TempDataDictionaryFactory>();
676services.AddSingleton<ITempDataProvider, SessionStateTempDataProvider>();
677services.AddSingleton<TempDataSerializer, DefaultTempDataSerializer>();
678services.AddSingleton<HtmlEncoder, HtmlTestEncoder>();
679services.AddSingleton<IViewBufferScope, TestViewBufferScope>();
680services.AddSingleton<IActionResultExecutor<ViewComponentResult>, ViewComponentResultExecutor>();
681services.AddSingleton<IHttpResponseStreamWriterFactory, TestHttpResponseStreamWriterFactory>();
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
Microsoft.AspNetCore.Routing.Tests (4)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.Kestrel (3)
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
Microsoft.AspNetCore.SignalR (1)
Microsoft.AspNetCore.SignalR.Client (3)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (3)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Microsoft.AspNetCore.SignalR.Tests (7)
Microsoft.AspNetCore.TestHost (4)
Microsoft.AspNetCore.TestHost.Tests (3)
Microsoft.AspNetCore.Tests (6)
Microsoft.DotNet.Build.Tasks.Feed.Tests (27)
PushToBuildStorageTests.cs (18)
215.AddSingleton<IBuildModelFactory, BuildModelFactory>();
246.AddSingleton<IBuildModelFactory, BuildModelFactory>();
291.AddSingleton<IBuildModelFactory, BuildModelFactory>()
292.AddSingleton<IPackageArtifactModelFactory, PackageArtifactModelFactory>()
293.AddSingleton<IBlobArtifactModelFactory, BlobArtifactModelFactory>()
340.AddSingleton<IBuildModelFactory, BuildModelFactory>()
341.AddSingleton<IPackageArtifactModelFactory, PackageArtifactModelFactory>()
342.AddSingleton<IBlobArtifactModelFactory, BlobArtifactModelFactory>()
387.AddSingleton<IBuildModelFactory, BuildModelFactory>()
388.AddSingleton<IPackageArtifactModelFactory, PackageArtifactModelFactory>()
389.AddSingleton<IBlobArtifactModelFactory, BlobArtifactModelFactory>()
437.AddSingleton<IBuildModelFactory, BuildModelFactory>()
438.AddSingleton<IPackageArtifactModelFactory, PackageArtifactModelFactory>()
439.AddSingleton<IBlobArtifactModelFactory, BlobArtifactModelFactory>()
541.AddSingleton<IBuildModelFactory, BuildModelFactory>()
542.AddSingleton<IPackageArtifactModelFactory, PackageArtifactModelFactory>()
543.AddSingleton<IBlobArtifactModelFactory, BlobArtifactModelFactory>()
544.AddSingleton<ISigningInformationModelFactory, SigningInformationModelFactory>()
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.Caching.Hybrid.Tests (10)
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (3)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (3)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (6)
Microsoft.Extensions.Hosting (5)
Microsoft.Extensions.Hosting.Systemd (2)
Microsoft.Extensions.Hosting.WindowsServices (2)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Extensions.Http.Diagnostics.Tests (6)
Microsoft.Extensions.Identity.Core (3)
Microsoft.Extensions.Options.Contextual.Tests (1)
Microsoft.Extensions.Telemetry.Abstractions (2)
Microsoft.Extensions.WebEncoders.Tests (2)
Microsoft.ML.AutoML (2)
Mvc.RoutingWebSite (8)
RazorWebSite (2)
SampleStartups (1)
SignalR.Client.FunctionalTestApp (1)
Sockets.BindTests (3)
Sockets.FunctionalTests (3)
VersioningWebSite (1)