65 references to Scoped
Aspire.Components.Common.Tests (1)
ConformanceTests.cs (1)
200
case ServiceLifetime.
Scoped
:
Aspire.Microsoft.Data.SqlClient.Tests (1)
ConformanceTests.cs (1)
20
protected override ServiceLifetime ServiceLifetime => ServiceLifetime.
Scoped
;
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Infrastructure\FunctionalTestsServiceCollectionExtensions.cs (1)
24
ServiceLifetime.
Scoped
);
Microsoft.DotNet.Internal.DependencyInjection.Testing (2)
DependencyInjectionValidation.cs (2)
70
if (!IsTypeResolvable(scopedType, services, allErrors, ServiceLifetime.
Scoped
))
149
parameterService.Lifetime == ServiceLifetime.
Scoped
)
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheServicesExtensionsTest.cs (1)
51
Assert.Equal(ServiceLifetime.
Scoped
, distributedCache.Lifetime);
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (2)
CacheServiceExtensionsTests.cs (2)
48
Assert.Equal(ServiceLifetime.
Scoped
, distributedCache.Lifetime);
119
Assert.Equal(ServiceLifetime.
Scoped
, distributedCache.Lifetime);
Microsoft.Extensions.DependencyInjection (5)
DependencyInjectionEventSource.cs (1)
201
case ServiceLifetime.
Scoped
:
ServiceLookup\CallSiteValidator.cs (3)
28
nameof(ServiceLifetime.
Scoped
).ToLowerInvariant()));
35
nameof(ServiceLifetime.
Scoped
).ToLowerInvariant()));
59
nameof(ServiceLifetime.
Scoped
).ToLowerInvariant(),
ServiceLookup\ResultCache.cs (1)
30
case 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
"/>
175
return Add(services, serviceType, implementationType, ServiceLifetime.
Scoped
);
187
/// <seealso cref="ServiceLifetime.
Scoped
"/>
197
return 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
"/>
193
return AddKeyed(services, serviceType, serviceKey, implementationType, ServiceLifetime.
Scoped
);
206
/// <seealso cref="ServiceLifetime.
Scoped
"/>
217
return 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.
520
return DescribeKeyed<TService, TImplementation>(null, ServiceLifetime.
Scoped
);
526
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
536
return DescribeKeyed<TService, TImplementation>(serviceKey, ServiceLifetime.
Scoped
);
542
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
551
return Describe(service, implementationType, ServiceLifetime.
Scoped
);
557
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
568
return DescribeKeyed(service, serviceKey, implementationType, ServiceLifetime.
Scoped
);
575
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
588
return Describe(typeof(TService), implementationFactory, ServiceLifetime.
Scoped
);
595
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
610
return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.
Scoped
);
616
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
626
return Describe(typeof(TService), implementationFactory, ServiceLifetime.
Scoped
);
632
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
643
return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.
Scoped
);
649
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
659
return Describe(service, implementationFactory, ServiceLifetime.
Scoped
);
665
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
676
return DescribeKeyed(service, serviceKey, implementationFactory, ServiceLifetime.
Scoped
);
Microsoft.Extensions.Http (2)
DependencyInjection\HttpClientBuilderExtensions.cs (2)
652
/// By default, the lifetime is <see cref="ServiceLifetime.
Scoped
"/>.
687
public static IHttpClientBuilder AddAsKeyed(this IHttpClientBuilder builder, ServiceLifetime lifetime = ServiceLifetime.
Scoped
)