71 references to Scoped
Aspire.Components.Common.TestUtilities (1)
ConformanceTests.cs (1)
235
case ServiceLifetime.
Scoped
:
Aspire.Microsoft.Data.SqlClient.Tests (1)
ConformanceTests.cs (1)
19
protected override ServiceLifetime ServiceLifetime => 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.AI.Tests (10)
ChatCompletion\DependencyInjectionPatterns.cs (6)
115
[InlineData(ServiceLifetime.
Scoped
)]
137
[InlineData(ServiceLifetime.
Scoped
)]
160
[InlineData(ServiceLifetime.
Scoped
)]
183
[InlineData(ServiceLifetime.
Scoped
)]
205
[InlineData(ServiceLifetime.
Scoped
)]
229
[InlineData(ServiceLifetime.
Scoped
)]
Image\ImageGeneratorDependencyInjectionPatterns.cs (2)
115
[InlineData(ServiceLifetime.
Scoped
)]
137
[InlineData(ServiceLifetime.
Scoped
)]
SpeechToText\SpeechToTextClientDependencyInjectionPatterns.cs (2)
115
[InlineData(ServiceLifetime.
Scoped
)]
137
[InlineData(ServiceLifetime.
Scoped
)]
Microsoft.Extensions.DependencyInjection (5)
DependencyInjectionEventSource.cs (1)
222
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)
212
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
230
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
252
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
274
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
289
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
307
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (6)
135
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
155
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
179
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
203
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
219
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
238
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Scoped
"/> service
ServiceCollectionServiceExtensions.cs (9)
205
/// <seealso cref="ServiceLifetime.
Scoped
"/>
215
return Add(services, serviceType, implementationType, ServiceLifetime.
Scoped
);
232
/// <seealso cref="ServiceLifetime.
Scoped
"/>
242
return Add(services, serviceType, implementationFactory, ServiceLifetime.
Scoped
);
259
/// <seealso cref="ServiceLifetime.
Scoped
"/>
281
/// <seealso cref="ServiceLifetime.
Scoped
"/>
304
/// <seealso cref="ServiceLifetime.
Scoped
"/>
327
/// <seealso cref="ServiceLifetime.
Scoped
"/>
355
/// <seealso cref="ServiceLifetime.
Scoped
"/>
ServiceCollectionServiceExtensions.Keyed.cs (9)
222
/// <seealso cref="ServiceLifetime.
Scoped
"/>
233
return AddKeyed(services, serviceType, serviceKey, implementationType, ServiceLifetime.
Scoped
);
251
/// <seealso cref="ServiceLifetime.
Scoped
"/>
262
return AddKeyed(services, serviceType, serviceKey, implementationFactory, ServiceLifetime.
Scoped
);
280
/// <seealso cref="ServiceLifetime.
Scoped
"/>
305
/// <seealso cref="ServiceLifetime.
Scoped
"/>
330
/// <seealso cref="ServiceLifetime.
Scoped
"/>
356
/// <seealso cref="ServiceLifetime.
Scoped
"/>
386
/// <seealso cref="ServiceLifetime.
Scoped
"/>
ServiceDescriptor.cs (20)
533
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
542
return DescribeKeyed<TService, TImplementation>(null, ServiceLifetime.
Scoped
);
548
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
558
return DescribeKeyed<TService, TImplementation>(serviceKey, ServiceLifetime.
Scoped
);
564
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
573
return Describe(service, implementationType, ServiceLifetime.
Scoped
);
579
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
590
return DescribeKeyed(service, serviceKey, implementationType, ServiceLifetime.
Scoped
);
597
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
610
return Describe(typeof(TService), implementationFactory, ServiceLifetime.
Scoped
);
617
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
632
return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.
Scoped
);
638
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
648
return Describe(typeof(TService), implementationFactory, ServiceLifetime.
Scoped
);
654
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
665
return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.
Scoped
);
671
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
681
return Describe(service, implementationFactory, ServiceLifetime.
Scoped
);
687
/// and the <see cref="ServiceLifetime.
Scoped
"/> lifetime.
698
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
)