201 references to Singleton
Aspire.Azure.AI.OpenAI.Tests (1)
Aspire.Azure.Data.Tables.Tests (1)
Aspire.Azure.Messaging.EventHubs.Tests (1)
Aspire.Azure.Messaging.ServiceBus.Tests (1)
Aspire.Azure.Messaging.WebPubSub.Tests (1)
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (3)
Aspire.Azure.Npgsql.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.MongoDB.Driver.v3.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.RabbitMQ.Client.v7.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)
41Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
42Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
43Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
75Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
76Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
77Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
108Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
109Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
110Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
141Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
142Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
143Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
163Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
164Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
165Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
187Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
188Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName);
189Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton);
Microsoft.DotNet.Internal.DependencyInjection.Testing (2)
Microsoft.Extensions.AI (24)
Microsoft.Extensions.AI.Tests (16)
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)
53/// as a <see cref="ServiceLifetime.Singleton"/>.
66/// as a <see cref="ServiceLifetime.Singleton"/>.
75: this(serviceType, serviceKey, ServiceLifetime.Singleton)
703/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
712return DescribeKeyed<TService, TImplementation>(null, ServiceLifetime.Singleton);
718/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
729return DescribeKeyed<TService, TImplementation>(serviceKey, ServiceLifetime.Singleton);
735/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
747return Describe(service, implementationType, ServiceLifetime.Singleton);
753/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
767return DescribeKeyed(service, serviceKey, implementationType, ServiceLifetime.Singleton);
774/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
787return Describe(typeof(TService), implementationFactory, ServiceLifetime.Singleton);
794/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
809return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.Singleton);
815/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
825return Describe(typeof(TService), implementationFactory, ServiceLifetime.Singleton);
831/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
844return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.Singleton);
850/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
862return Describe(serviceType, implementationFactory, ServiceLifetime.Singleton);
868/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
882return DescribeKeyed(serviceType, serviceKey, implementationFactory, ServiceLifetime.Singleton);
888/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
904/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
923/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
941/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (5)
Microsoft.Extensions.Http (3)
Microsoft.Maui (2)