7 references to Singleton
Microsoft.AspNetCore.Hosting (3)
WebHostBuilder.cs (3)
355services.Replace(ServiceDescriptor.Singleton(typeof(DiagnosticListener), listener!)); 356services.Replace(ServiceDescriptor.Singleton(typeof(DiagnosticSource), listener!)); 359services.Replace(ServiceDescriptor.Singleton(typeof(ActivitySource), activitySource!));
Microsoft.AspNetCore.Http.Extensions.Tests (1)
ProblemDetailsServiceCollectionExtensionsTest.cs (1)
56collection.TryAddEnumerable(ServiceDescriptor.Singleton(typeof(IProblemDetailsWriter), mockWriter));
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
HubConnectionReceiveBenchmark.cs (1)
72hubConnectionBuilder.Services.TryAddEnumerable(ServiceDescriptor.Singleton(typeof(IHubProtocol), hubProtocol));
Microsoft.Extensions.DependencyInjection.Abstractions (2)
Extensions\ServiceCollectionDescriptorExtensions.cs (1)
415var descriptor = ServiceDescriptor.Singleton(serviceType: typeof(TService), implementationInstance: instance);
ServiceDescriptor.cs (1)
877return Singleton(serviceType: typeof(TService), implementationInstance: implementationInstance);