65 references to Scoped
Aspire.Components.Common.Tests (1)
ConformanceTests.cs (1)
200case ServiceLifetime.Scoped:
Aspire.Microsoft.Data.SqlClient.Tests (1)
ConformanceTests.cs (1)
20protected override ServiceLifetime ServiceLifetime => ServiceLifetime.Scoped;
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Infrastructure\FunctionalTestsServiceCollectionExtensions.cs (1)
24ServiceLifetime.Scoped);
Microsoft.DotNet.Internal.DependencyInjection.Testing (2)
DependencyInjectionValidation.cs (2)
70if (!IsTypeResolvable(scopedType, services, allErrors, ServiceLifetime.Scoped)) 149parameterService.Lifetime == ServiceLifetime.Scoped)
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheServicesExtensionsTest.cs (1)
51Assert.Equal(ServiceLifetime.Scoped, distributedCache.Lifetime);
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (2)
CacheServiceExtensionsTests.cs (2)
48Assert.Equal(ServiceLifetime.Scoped, distributedCache.Lifetime); 119Assert.Equal(ServiceLifetime.Scoped, distributedCache.Lifetime);
Microsoft.Extensions.DependencyInjection (5)
DependencyInjectionEventSource.cs (1)
201case ServiceLifetime.Scoped:
ServiceLookup\CallSiteValidator.cs (3)
28nameof(ServiceLifetime.Scoped).ToLowerInvariant())); 35nameof(ServiceLifetime.Scoped).ToLowerInvariant())); 59nameof(ServiceLifetime.Scoped).ToLowerInvariant(),
ServiceLookup\ResultCache.cs (1)
30case ServiceLifetime.Scoped:
Microsoft.Extensions.DependencyInjection.Abstractions (50)
Extensions\ServiceCollectionDescriptorExtensions.cs (6)
206/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.Scoped"/> service 223/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.Scoped"/> service 244/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.Scoped"/> service 265/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Scoped"/> service 279/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Scoped"/> service 296/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Scoped"/> service
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (6)
129/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.Scoped"/> service 148/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.Scoped"/> service 171/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.Scoped"/> service 194/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Scoped"/> service 209/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Scoped"/> service 227/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Scoped"/> service
ServiceCollectionServiceExtensions.cs (9)
165/// <seealso cref="ServiceLifetime.Scoped"/> 175return Add(services, serviceType, implementationType, ServiceLifetime.Scoped); 187/// <seealso cref="ServiceLifetime.Scoped"/> 197return Add(services, serviceType, implementationFactory, ServiceLifetime.Scoped); 209/// <seealso cref="ServiceLifetime.Scoped"/> 226/// <seealso cref="ServiceLifetime.Scoped"/> 244/// <seealso cref="ServiceLifetime.Scoped"/> 262/// <seealso cref="ServiceLifetime.Scoped"/> 285/// <seealso cref="ServiceLifetime.Scoped"/>
ServiceCollectionServiceExtensions.Keyed.cs (9)
182/// <seealso cref="ServiceLifetime.Scoped"/> 193return AddKeyed(services, serviceType, serviceKey, implementationType, ServiceLifetime.Scoped); 206/// <seealso cref="ServiceLifetime.Scoped"/> 217return AddKeyed(services, serviceType, serviceKey, implementationFactory, ServiceLifetime.Scoped); 230/// <seealso cref="ServiceLifetime.Scoped"/> 250/// <seealso cref="ServiceLifetime.Scoped"/> 270/// <seealso cref="ServiceLifetime.Scoped"/> 291/// <seealso cref="ServiceLifetime.Scoped"/> 316/// <seealso cref="ServiceLifetime.Scoped"/>
ServiceDescriptor.cs (20)
511/// and the <see cref="ServiceLifetime.Scoped"/> lifetime. 520return DescribeKeyed<TService, TImplementation>(null, ServiceLifetime.Scoped); 526/// and the <see cref="ServiceLifetime.Scoped"/> lifetime. 536return DescribeKeyed<TService, TImplementation>(serviceKey, ServiceLifetime.Scoped); 542/// and the <see cref="ServiceLifetime.Scoped"/> lifetime. 551return Describe(service, implementationType, ServiceLifetime.Scoped); 557/// and the <see cref="ServiceLifetime.Scoped"/> lifetime. 568return DescribeKeyed(service, serviceKey, implementationType, ServiceLifetime.Scoped); 575/// and the <see cref="ServiceLifetime.Scoped"/> lifetime. 588return Describe(typeof(TService), implementationFactory, ServiceLifetime.Scoped); 595/// and the <see cref="ServiceLifetime.Scoped"/> lifetime. 610return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.Scoped); 616/// and the <see cref="ServiceLifetime.Scoped"/> lifetime. 626return Describe(typeof(TService), implementationFactory, ServiceLifetime.Scoped); 632/// and the <see cref="ServiceLifetime.Scoped"/> lifetime. 643return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.Scoped); 649/// and the <see cref="ServiceLifetime.Scoped"/> lifetime. 659return Describe(service, implementationFactory, ServiceLifetime.Scoped); 665/// and the <see cref="ServiceLifetime.Scoped"/> lifetime. 676return DescribeKeyed(service, serviceKey, implementationFactory, ServiceLifetime.Scoped);
Microsoft.Extensions.Http (2)
DependencyInjection\HttpClientBuilderExtensions.cs (2)
652/// By default, the lifetime is <see cref="ServiceLifetime.Scoped"/>. 687public static IHttpClientBuilder AddAsKeyed(this IHttpClientBuilder builder, ServiceLifetime lifetime = ServiceLifetime.Scoped)