1048 references to AddSingleton
ApiExplorerWebSite (1)
Aspire.Azure.Messaging.EventHubs.Tests (1)
Aspire.Dashboard.Components.Tests (22)
Aspire.Dashboard.Tests (5)
Aspire.Hosting (12)
Aspire.Hosting.Testing.Tests (3)
Aspire.Hosting.Tests (4)
Aspire.Playground.Tests (3)
BasicTestApp (1)
BasicWebSite (1)
ClientSample (1)
DaprServiceC (1)
GenericHostWebSite (1)
HostFilteringSample (1)
IIS.Tests (1)
InMemory.FunctionalTests (13)
Microsoft.AspNetCore (1)
Microsoft.AspNetCore.Antiforgery.Test (6)
Microsoft.AspNetCore.Authentication.Core.Test (1)
Microsoft.AspNetCore.Authentication.Negotiate.Test (1)
Microsoft.AspNetCore.Authentication.Test (65)
Microsoft.AspNetCore.Authorization.Test (20)
Microsoft.AspNetCore.Components.Authorization.Tests (7)
Microsoft.AspNetCore.Components.Endpoints.Tests (12)
Microsoft.AspNetCore.Components.Server.Tests (7)
Microsoft.AspNetCore.Components.Tests (3)
Microsoft.AspNetCore.Components.Web.Tests (43)
Microsoft.AspNetCore.Components.WebAssembly (8)
Microsoft.AspNetCore.Components.WebAssembly.Tests (3)
Microsoft.AspNetCore.DataProtection.Tests (20)
Microsoft.AspNetCore.Diagnostics.Tests (10)
Microsoft.AspNetCore.HeaderParsing.Tests (1)
Microsoft.AspNetCore.HostFiltering.Tests (1)
Microsoft.AspNetCore.Hosting (10)
Microsoft.AspNetCore.Hosting.Abstractions (1)
Microsoft.AspNetCore.Hosting.Tests (30)
StartupManagerTests.cs (19)
22serviceCollection.AddSingleton<IStartupConfigureServicesFilter>(new TestStartupServicesFilter(1, overrideAfterService: true));
23serviceCollection.AddSingleton<IStartupConfigureServicesFilter>(new TestStartupServicesFilter(2, overrideAfterService: true));
44serviceCollection.AddSingleton<IStartupConfigureServicesFilter>(new TestStartupServicesFilter(1, overrideAfterService: false));
45serviceCollection.AddSingleton<IStartupConfigureServicesFilter>(new TestStartupServicesFilter(2, overrideAfterService: true));
66serviceCollection.AddSingleton<IStartupConfigureServicesFilter>(new TestStartupServicesFilter(1, overrideAfterService: false));
90serviceCollection.AddSingleton<IStartupConfigureContainerFilter<MyContainer>>(new TestConfigureContainerFilter(1, overrideAfterService: true));
91serviceCollection.AddSingleton<IStartupConfigureContainerFilter<MyContainer>>(new TestConfigureContainerFilter(2, overrideAfterService: true));
112serviceCollection.AddSingleton<IStartupConfigureContainerFilter<MyContainer>>(new TestConfigureContainerFilter(1, overrideAfterService: false));
113serviceCollection.AddSingleton<IStartupConfigureContainerFilter<MyContainer>>(new TestConfigureContainerFilter(2, overrideAfterService: true));
134serviceCollection.AddSingleton<IStartupConfigureServicesFilter>(new TestStartupServicesFilter(1, overrideAfterService: false));
135serviceCollection.AddSingleton<IStartupConfigureContainerFilter<MyContainer>>(new TestConfigureContainerFilter(2, overrideAfterService: true));
206services.Services.AddSingleton(new ServiceAfter { Message = $"ConfigureContainerFilter After {AdditionalData}" });
255services.AddSingleton(new ServiceAfter { Message = $"StartupServicesFilter After {AdditionalData}" });
294serviceCollection.AddSingleton<IFakeStartupCallback>(callbackStartup);
311serviceCollection.AddSingleton<IServiceProviderFactory<IServiceCollection>>(new DefaultServiceProviderFactory(new ServiceProviderOptions
364serviceCollection.AddSingleton<IFakeStartupCallback>(new FakeStartupCallback());
411serviceCollection.AddSingleton<IFakeStartupCallback>(new FakeStartupCallback());
425serviceCollection.AddSingleton<IFakeStartupCallback>(new FakeStartupCallback());
440serviceCollection.AddSingleton<IFakeStartupCallback>(new FakeStartupCallback());
Microsoft.AspNetCore.Http.Connections.Tests (2)
Microsoft.AspNetCore.Http.Extensions.Tests (27)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Results.Tests (29)
Microsoft.AspNetCore.Http.Tests (3)
Microsoft.AspNetCore.HttpLogging.Tests (3)
Microsoft.AspNetCore.HttpsPolicy.Tests (12)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (26)
Microsoft.AspNetCore.Identity.FunctionalTests (13)
Microsoft.AspNetCore.Identity.InMemory.Test (14)
Microsoft.AspNetCore.Identity.Specification.Tests (4)
Microsoft.AspNetCore.Identity.Test (45)
SecurityStampValidatorTest.cs (21)
120services.AddSingleton(options.Object);
121services.AddSingleton(signInManager.Object);
122services.AddSingleton<ISecurityStampValidator>(new SecurityStampValidator<PocoUser>(options.Object, signInManager.Object, new LoggerFactory()));
123services.AddSingleton(authService.Object);
174services.AddSingleton(options.Object);
175services.AddSingleton(signInManager);
176services.AddSingleton<ISecurityStampValidator>(new SecurityStampValidator<PocoUser>(options.Object, signInManager, new LoggerFactory()));
215services.AddSingleton(options.Object);
216services.AddSingleton(signInManager.Object);
217services.AddSingleton<ISecurityStampValidator>(new SecurityStampValidator<PocoUser>(options.Object, signInManager.Object, new LoggerFactory()));
218services.AddSingleton(authService.Object);
253services.AddSingleton(options.Object);
254services.AddSingleton(signInManager.Object);
255services.AddSingleton<ISecurityStampValidator>(new SecurityStampValidator<PocoUser>(options.Object, signInManager.Object, new LoggerFactory()));
291services.AddSingleton(options.Object);
292services.AddSingleton(signInManager.Object);
293services.AddSingleton<ISecurityStampValidator>(new SecurityStampValidator<PocoUser>(options.Object, signInManager.Object, new LoggerFactory()));
340services.AddSingleton(options.Object);
341services.AddSingleton(signInManager.Object);
342services.AddSingleton<ITwoFactorSecurityStampValidator>(new TwoFactorSecurityStampValidator<PocoUser>(options.Object, signInManager.Object, new LoggerFactory()));
343services.AddSingleton(authService.Object);
Microsoft.AspNetCore.InternalTesting (4)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
Microsoft.AspNetCore.Mvc.Core.Test (92)
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
Microsoft.AspNetCore.Mvc.Cors.Test (1)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (3)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (4)
Microsoft.AspNetCore.Mvc.IntegrationTests (5)
Microsoft.AspNetCore.Mvc.Localization.Test (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
Microsoft.AspNetCore.Mvc.Razor.Test (8)
Microsoft.AspNetCore.Mvc.RazorPages.Test (15)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (7)
Microsoft.AspNetCore.Mvc.Test (24)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (26)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.OpenApi.Tests (21)
Microsoft.AspNetCore.Owin.Tests (1)
Microsoft.AspNetCore.RequestDecompression.Tests (6)
Microsoft.AspNetCore.ResponseCompression.Tests (4)
Microsoft.AspNetCore.Routing.Tests (20)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Server.IISIntegration (1)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (11)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
Microsoft.AspNetCore.Session.Tests (9)
Microsoft.AspNetCore.SignalR.Client.Core (3)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (18)
Microsoft.AspNetCore.SignalR.Client.Tests (26)
Microsoft.AspNetCore.SignalR.Microbenchmarks (3)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Microsoft.AspNetCore.SignalR.Tests (55)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (3)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (8)
Microsoft.AspNetCore.TestHost (2)
Microsoft.AspNetCore.TestHost.Tests (12)
Microsoft.AspNetCore.Tests (15)
Microsoft.AspNetCore.WebSockets.Tests (1)
Microsoft.DotNet.Build.Tasks.Feed.Tests (14)
Microsoft.DotNet.Helix.Sdk.Tests (12)
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.Caching.Hybrid.Tests (3)
Microsoft.Extensions.Diagnostics (3)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (3)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (4)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (8)
Microsoft.Extensions.Hosting (3)
Microsoft.Extensions.Hosting.Testing (1)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Extensions.Http.Polly (3)
Microsoft.Extensions.Http.Polly.Tests (1)
Microsoft.Extensions.Http.Resilience.PerformanceTests (2)
Microsoft.Extensions.Http.Resilience.Tests (4)
Microsoft.Extensions.Logging (1)
Microsoft.Extensions.Logging.AzureAppServices (8)
Microsoft.Extensions.Logging.Configuration (3)
Microsoft.Extensions.Options (5)
Microsoft.Extensions.Options.ConfigurationExtensions (2)
Microsoft.Extensions.Options.Contextual (2)
Microsoft.Extensions.Options.DataAnnotations (1)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (4)
Microsoft.Extensions.ServiceDiscovery.Tests (10)
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (5)
Microsoft.Extensions.Telemetry.Abstractions (2)
Microsoft.ML.AutoML (9)
Microsoft.ML.GenAI.Phi (2)
RazorBuildWebSite (2)
Sockets.BindTests (2)
Sockets.FunctionalTests (4)