68 references to Transient
Aspire.Components.Common.TestUtilities (1)
ConformanceTests.cs (1)
239
case ServiceLifetime.
Transient
:
Microsoft.Extensions.AI.Tests (12)
ChatCompletion\DependencyInjectionPatterns.cs (8)
116
[InlineData(ServiceLifetime.
Transient
)]
138
[InlineData(ServiceLifetime.
Transient
)]
161
[InlineData(ServiceLifetime.
Transient
)]
184
[InlineData(ServiceLifetime.
Transient
)]
199
Assert.Equal(lifetime != ServiceLifetime.
Transient
, ReferenceEquals(g, ng));
206
[InlineData(ServiceLifetime.
Transient
)]
230
[InlineData(ServiceLifetime.
Transient
)]
245
Assert.Equal(lifetime != ServiceLifetime.
Transient
, ReferenceEquals(g, ng));
Image\ImageGeneratorDependencyInjectionPatterns.cs (2)
116
[InlineData(ServiceLifetime.
Transient
)]
138
[InlineData(ServiceLifetime.
Transient
)]
SpeechToText\SpeechToTextClientDependencyInjectionPatterns.cs (2)
116
[InlineData(ServiceLifetime.
Transient
)]
138
[InlineData(ServiceLifetime.
Transient
)]
Microsoft.Extensions.DependencyInjection (2)
DependencyInjectionEventSource.cs (1)
225
case ServiceLifetime.
Transient
:
ServiceLookup\ResultCache.cs (1)
33
case ServiceLifetime.
Transient
:
Microsoft.Extensions.DependencyInjection.Abstractions (50)
Extensions\ServiceCollectionDescriptorExtensions.cs (6)
100
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Transient
"/> service
118
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Transient
"/> service
140
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Transient
"/> service
162
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Transient
"/> service
177
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Transient
"/> service
195
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Transient
"/> service
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (6)
13
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Transient
"/> service
33
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Transient
"/> service
57
/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.
Transient
"/> service
81
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Transient
"/> service
97
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Transient
"/> service
116
/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.
Transient
"/> service
ServiceCollectionServiceExtensions.cs (9)
28
/// <seealso cref="ServiceLifetime.
Transient
"/>
38
return Add(services, serviceType, implementationType, ServiceLifetime.
Transient
);
55
/// <seealso cref="ServiceLifetime.
Transient
"/>
65
return Add(services, serviceType, implementationFactory, ServiceLifetime.
Transient
);
82
/// <seealso cref="ServiceLifetime.
Transient
"/>
104
/// <seealso cref="ServiceLifetime.
Transient
"/>
127
/// <seealso cref="ServiceLifetime.
Transient
"/>
150
/// <seealso cref="ServiceLifetime.
Transient
"/>
178
/// <seealso cref="ServiceLifetime.
Transient
"/>
ServiceCollectionServiceExtensions.Keyed.cs (9)
29
/// <seealso cref="ServiceLifetime.
Transient
"/>
40
return AddKeyed(services, serviceType, serviceKey, implementationType, ServiceLifetime.
Transient
);
58
/// <seealso cref="ServiceLifetime.
Transient
"/>
69
return AddKeyed(services, serviceType, serviceKey, implementationFactory, ServiceLifetime.
Transient
);
87
/// <seealso cref="ServiceLifetime.
Transient
"/>
112
/// <seealso cref="ServiceLifetime.
Transient
"/>
137
/// <seealso cref="ServiceLifetime.
Transient
"/>
163
/// <seealso cref="ServiceLifetime.
Transient
"/>
193
/// <seealso cref="ServiceLifetime.
Transient
"/>
ServiceDescriptor.cs (20)
356
/// and the <see cref="ServiceLifetime.
Transient
"/> lifetime.
365
return DescribeKeyed<TService, TImplementation>(null, ServiceLifetime.
Transient
);
371
/// and the <see cref="ServiceLifetime.
Transient
"/> lifetime.
381
return DescribeKeyed<TService, TImplementation>(serviceKey, ServiceLifetime.
Transient
);
387
/// and the <see cref="ServiceLifetime.
Transient
"/> lifetime.
399
return Describe(service, implementationType, ServiceLifetime.
Transient
);
405
/// and the <see cref="ServiceLifetime.
Transient
"/> lifetime.
419
return DescribeKeyed(service, serviceKey, implementationType, ServiceLifetime.
Transient
);
426
/// and the <see cref="ServiceLifetime.
Transient
"/> lifetime.
439
return Describe(typeof(TService), implementationFactory, ServiceLifetime.
Transient
);
446
/// and the <see cref="ServiceLifetime.
Transient
"/> lifetime.
461
return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.
Transient
);
467
/// and the <see cref="ServiceLifetime.
Transient
"/> lifetime.
477
return Describe(typeof(TService), implementationFactory, ServiceLifetime.
Transient
);
483
/// and the <see cref="ServiceLifetime.
Transient
"/> lifetime.
494
return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.
Transient
);
500
/// and the <see cref="ServiceLifetime.
Transient
"/> lifetime.
510
return Describe(service, implementationFactory, ServiceLifetime.
Transient
);
516
/// and the <see cref="ServiceLifetime.
Transient
"/> lifetime.
527
return DescribeKeyed(service, serviceKey, implementationFactory, ServiceLifetime.
Transient
);
Microsoft.Extensions.Http (3)
DependencyInjection\HttpClientBuilderExtensions.cs (3)
664
/// WARNING: Registering the client as a keyed <see cref="ServiceLifetime.
Transient
"/> service will lead to the <see cref="HttpClient"/> and <see cref="HttpMessageHandler"/>
669
/// WARNING: In case of (1) a keyed <see cref="ServiceLifetime.Singleton"/> <see cref="HttpClient"/> registration, or (2) a keyed <see cref="ServiceLifetime.
Transient
"/>
672
/// which can result in the loss of DNS changes. (This is a similar issue to the one with Typed Clients, that are registered as <see cref="ServiceLifetime.
Transient
"/> services.)