76 references to Transient
Aspire.Components.Common.Tests (1)
ConformanceTests.cs (1)
204case ServiceLifetime.Transient:
Microsoft.AspNetCore.Mvc.Core.Test (3)
DependencyInjection\MvcBuilderExtensionsTest.cs (3)
100Assert.Equal(ServiceLifetime.Transient, services[0].Lifetime); 104Assert.Equal(ServiceLifetime.Transient, services[1].Lifetime); 108Assert.Equal(ServiceLifetime.Transient, services[2].Lifetime);
Microsoft.AspNetCore.Mvc.Localization.Test (9)
MvcLocalizationMvcBuilderExtensionsTest.cs (4)
55Assert.Equal(ServiceLifetime.Transient, service.Lifetime); 62Assert.Equal(ServiceLifetime.Transient, service.Lifetime); 77Assert.Equal(ServiceLifetime.Transient, service.Lifetime); 82Assert.Equal(ServiceLifetime.Transient, service.Lifetime);
MvcLocalizationMvcCoreBuilderExtensionsTest.cs (5)
55Assert.Equal(ServiceLifetime.Transient, service.Lifetime); 62Assert.Equal(ServiceLifetime.Transient, service.Lifetime); 67Assert.Equal(ServiceLifetime.Transient, service.Lifetime); 77Assert.Equal(ServiceLifetime.Transient, service.Lifetime); 82Assert.Equal(ServiceLifetime.Transient, service.Lifetime);
Microsoft.AspNetCore.Mvc.Razor.Test (6)
DependencyInjection\MvcRazorMvcBuilderExtensionsTest.cs (3)
56Assert.Equal(ServiceLifetime.Transient, tagHelperOne.Lifetime); 60Assert.Equal(ServiceLifetime.Transient, tagHelperTwo.Lifetime); 64Assert.Equal(ServiceLifetime.Transient, activator.Lifetime);
DependencyInjection\MvcRazorMvcCoreBuilderExtensionsTest.cs (3)
96Assert.Equal(ServiceLifetime.Transient, tagHelperOne.Lifetime); 100Assert.Equal(ServiceLifetime.Transient, tagHelperTwo.Lifetime); 104Assert.Equal(ServiceLifetime.Transient, activator.Lifetime);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
DependencyInjection\MvcViewFeaturesMvcBuilderExtensionsTest.cs (2)
147Assert.Equal(ServiceLifetime.Transient, collection[0].Lifetime); 151Assert.Equal(ServiceLifetime.Transient, collection[1].Lifetime);
Microsoft.Extensions.DependencyInjection (2)
DependencyInjectionEventSource.cs (1)
204case ServiceLifetime.Transient:
ServiceLookup\ResultCache.cs (1)
33case 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 117/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.Transient"/> service 138/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.Transient"/> service 159/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Transient"/> service 173/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Transient"/> service 190/// 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 32/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.Transient"/> service 55/// Adds the specified <paramref name="service"/> as a <see cref="ServiceLifetime.Transient"/> service 78/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Transient"/> service 93/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Transient"/> service 111/// Adds the specified <typeparamref name="TService"/> as a <see cref="ServiceLifetime.Transient"/> service
ServiceCollectionServiceExtensions.cs (9)
23/// <seealso cref="ServiceLifetime.Transient"/> 33return Add(services, serviceType, implementationType, ServiceLifetime.Transient); 45/// <seealso cref="ServiceLifetime.Transient"/> 55return Add(services, serviceType, implementationFactory, ServiceLifetime.Transient); 67/// <seealso cref="ServiceLifetime.Transient"/> 84/// <seealso cref="ServiceLifetime.Transient"/> 102/// <seealso cref="ServiceLifetime.Transient"/> 120/// <seealso cref="ServiceLifetime.Transient"/> 143/// <seealso cref="ServiceLifetime.Transient"/>
ServiceCollectionServiceExtensions.Keyed.cs (9)
24/// <seealso cref="ServiceLifetime.Transient"/> 35return AddKeyed(services, serviceType, serviceKey, implementationType, ServiceLifetime.Transient); 48/// <seealso cref="ServiceLifetime.Transient"/> 59return AddKeyed(services, serviceType, serviceKey, implementationFactory, ServiceLifetime.Transient); 72/// <seealso cref="ServiceLifetime.Transient"/> 92/// <seealso cref="ServiceLifetime.Transient"/> 112/// <seealso cref="ServiceLifetime.Transient"/> 133/// <seealso cref="ServiceLifetime.Transient"/> 158/// <seealso cref="ServiceLifetime.Transient"/>
ServiceDescriptor.cs (20)
334/// and the <see cref="ServiceLifetime.Transient"/> lifetime. 343return DescribeKeyed<TService, TImplementation>(null, ServiceLifetime.Transient); 349/// and the <see cref="ServiceLifetime.Transient"/> lifetime. 359return DescribeKeyed<TService, TImplementation>(serviceKey, ServiceLifetime.Transient); 365/// and the <see cref="ServiceLifetime.Transient"/> lifetime. 377return Describe(service, implementationType, ServiceLifetime.Transient); 383/// and the <see cref="ServiceLifetime.Transient"/> lifetime. 397return DescribeKeyed(service, serviceKey, implementationType, ServiceLifetime.Transient); 404/// and the <see cref="ServiceLifetime.Transient"/> lifetime. 417return Describe(typeof(TService), implementationFactory, ServiceLifetime.Transient); 424/// and the <see cref="ServiceLifetime.Transient"/> lifetime. 439return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.Transient); 445/// and the <see cref="ServiceLifetime.Transient"/> lifetime. 455return Describe(typeof(TService), implementationFactory, ServiceLifetime.Transient); 461/// and the <see cref="ServiceLifetime.Transient"/> lifetime. 472return DescribeKeyed(typeof(TService), serviceKey, implementationFactory, ServiceLifetime.Transient); 478/// and the <see cref="ServiceLifetime.Transient"/> lifetime. 488return Describe(service, implementationFactory, ServiceLifetime.Transient); 494/// and the <see cref="ServiceLifetime.Transient"/> lifetime. 505return 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.)