142 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.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.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.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.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)
688/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
697return DescribeKeyed<TService, TImplementation>(null, ServiceLifetime.Singleton);
703/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
714return DescribeKeyed<TService, TImplementation>(serviceKey, ServiceLifetime.Singleton);
720/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
732return Describe(service, implementationType, ServiceLifetime.Singleton);
738/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
752return DescribeKeyed(service, serviceKey, implementationType, ServiceLifetime.Singleton);
759/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
772return Describe(typeof(TService), implementationFactory, ServiceLifetime.Singleton);
779/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
794return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.Singleton);
800/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
810return Describe(typeof(TService), implementationFactory, ServiceLifetime.Singleton);
816/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
829return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.Singleton);
835/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
847return Describe(serviceType, implementationFactory, ServiceLifetime.Singleton);
853/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
867return DescribeKeyed(serviceType, serviceKey, implementationFactory, ServiceLifetime.Singleton);
873/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
889/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
908/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
926/// and the <see cref="ServiceLifetime.Singleton"/> lifetime.
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (5)