152 references to Singleton
Aspire.Azure.AI.OpenAI.Tests (1)
Aspire.Azure.Data.Tables.Tests (1)
Aspire.Azure.Messaging.ServiceBus.Tests (1)
Aspire.Azure.Messaging.WebPubSub.Tests (1)
Aspire.Azure.Search.Documents.Tests (1)
Aspire.Azure.Security.KeyVault.Tests (1)
Aspire.Azure.Storage.Blobs.Tests (1)
Aspire.Azure.Storage.Queues.Tests (1)
Aspire.Components.Common.Tests (1)
Aspire.Confluent.Kafka.Tests (2)
Aspire.Elastic.Clients.Elasticsearch.Tests (1)
Aspire.Hosting.Testing.Tests (1)
Aspire.Microsoft.Azure.Cosmos.Tests (1)
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (3)
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (3)
Aspire.Milvus.Client.Tests (1)
Aspire.MongoDB.Driver.Tests (1)
Aspire.MySqlConnector.Tests (1)
Aspire.NATS.Net.Tests (1)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (3)
Aspire.Npgsql.Tests (1)
Aspire.OpenAI.Tests (1)
Aspire.Oracle.EntityFrameworkCore.Tests (3)
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (3)
Aspire.Qdrant.Client.Tests (1)
Aspire.RabbitMQ.Client.Tests (1)
Aspire.StackExchange.Redis.Tests (1)
Microsoft.AspNetCore.AsyncState.Tests (2)
Microsoft.AspNetCore.DataProtection (2)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
Microsoft.AspNetCore.Http.Tests (1)
Microsoft.AspNetCore.Mvc.Localization.Test (5)
Microsoft.AspNetCore.Mvc.Test (3)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Microsoft.AspNetCore.OpenApi.Tests (18)
Extensions\OpenApiServiceCollectionExtensionsTests.cs (18)
38Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
39Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
40Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
72Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
73Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
74Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
105Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
106Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
107Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
138Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
139Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
140Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
160Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
161Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
162Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
184Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
185Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
186Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
Microsoft.DotNet.Internal.DependencyInjection.Testing (2)
Microsoft.Extensions.AsyncState.Tests (3)
Microsoft.Extensions.Caching.SqlServer.Tests (1)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
Microsoft.Extensions.DependencyInjection (3)
Microsoft.Extensions.DependencyInjection.Abstractions (63)
ServiceDescriptor.cs (27)
52/// as a <see cref="ServiceLifetime.Singleton"/>.
65/// as a <see cref="ServiceLifetime.Singleton"/>.
74: this(serviceType, serviceKey, ServiceLifetime.Singleton)
682/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
691return DescribeKeyed<TService, TImplementation>(null, ServiceLifetime.Singleton);
697/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
708return DescribeKeyed<TService, TImplementation>(serviceKey, ServiceLifetime.Singleton);
714/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
726return Describe(service, implementationType, ServiceLifetime.Singleton);
732/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
746return DescribeKeyed(service, serviceKey, implementationType, ServiceLifetime.Singleton);
753/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
766return Describe(typeof(TService), implementationFactory, ServiceLifetime.Singleton);
773/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
788return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.Singleton);
794/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
804return Describe(typeof(TService), implementationFactory, ServiceLifetime.Singleton);
810/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
823return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.Singleton);
829/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
841return Describe(serviceType, implementationFactory, ServiceLifetime.Singleton);
847/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
861return DescribeKeyed(serviceType, serviceKey, implementationFactory, ServiceLifetime.Singleton);
867/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
883/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
902/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
920/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (5)
Microsoft.Extensions.Http (3)