89 references to AddTransient
aspire (18)
Program.cs (18)
227builder.Services.AddTransient<NewCommand>(); 228builder.Services.AddTransient<InitCommand>(); 229builder.Services.AddTransient<RunCommand>(); 230builder.Services.AddTransient<AddCommand>(); 231builder.Services.AddTransient<PublishCommand>(); 232builder.Services.AddTransient<ConfigCommand>(); 233builder.Services.AddTransient<CacheCommand>(); 234builder.Services.AddTransient<DoctorCommand>(); 235builder.Services.AddTransient<UpdateCommand>(); 236builder.Services.AddTransient<DeployCommand>(); 237builder.Services.AddTransient<DoCommand>(); 238builder.Services.AddTransient<ExecCommand>(); 239builder.Services.AddTransient<McpCommand>(); 240builder.Services.AddTransient<SdkCommand>(); 241builder.Services.AddTransient<SdkGenerateCommand>(); 242builder.Services.AddTransient<SdkDumpCommand>(); 243builder.Services.AddTransient<RootCommand>(); 244builder.Services.AddTransient<ExtensionInternalCommand>();
Aspire.Cli.Tests (18)
Utils\CliTestHelper.cs (18)
128services.AddTransient<RootCommand>(); 129services.AddTransient<NewCommand>(); 130services.AddTransient<InitCommand>(); 131services.AddTransient<RunCommand>(); 132services.AddTransient<ExecCommand>(); 133services.AddTransient<AddCommand>(); 134services.AddTransient<DeployCommand>(); 135services.AddTransient<DoCommand>(); 136services.AddTransient<PublishCommand>(); 137services.AddTransient<ConfigCommand>(); 138services.AddTransient<CacheCommand>(); 139services.AddTransient<DoctorCommand>(); 140services.AddTransient<UpdateCommand>(); 141services.AddTransient<McpCommand>(); 142services.AddTransient<ExtensionInternalCommand>(); 143services.AddTransient<SdkCommand>(); 144services.AddTransient<SdkGenerateCommand>(); 145services.AddTransient<SdkDumpCommand>();
Aspire.Dashboard (7)
DashboardWebApplication.cs (7)
284builder.Services.AddTransient<StructuredLogsViewModel>(); 286builder.Services.AddTransient<OtlpLogsService>(); 287builder.Services.AddTransient<OtlpTraceService>(); 288builder.Services.AddTransient<OtlpMetricsService>(); 291builder.Services.AddTransient<AssistantChatViewModel>(); 292builder.Services.AddTransient<AssistantChatDataContext>(); 294builder.Services.AddTransient<TracesViewModel>();
BasicWebSite (1)
StartupWithoutEndpointRouting.cs (1)
50services.AddTransient<ServiceActionFilter>();
Keycloak.Web (1)
Program.cs (1)
20.AddTransient<AuthorizationHandler>();
Microsoft.AspNetCore.Authentication (1)
AuthenticationBuilder.cs (1)
51Services.AddTransient<THandler>();
Microsoft.AspNetCore.Components.Tests (9)
ComponentFactoryTest.cs (2)
481.AddTransient<TestService1>() 482.AddTransient<TestService2>()
OwningComponentBaseTest.cs (7)
16services.AddTransient<MyService>(); 37services.AddTransient<MyService>(); 60services.AddTransient<MyService>(); 80services.AddTransient<MyService>(); 119services.AddTransient<MyService>(); 135services.AddTransient<MyService>(); 180services.AddTransient<MyService>();
Microsoft.AspNetCore.Hosting.Tests (4)
WebHostBuilderTests.cs (4)
222s.AddTransient<ServiceD>(); 247s.AddTransient<ServiceD>(); 472services.AddTransient<ServiceA>(); 477services.AddTransient<ServiceB>();
Microsoft.AspNetCore.Http.Tests (2)
DefaultHttpContextTests.cs (2)
207.AddTransient<DisposableThing>() 234.AddTransient<DisposableThing>()
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Filters\PageSaveTempDataPropertyFilterFactoryTest.cs (1)
37serviceCollection.AddTransient<PageSaveTempDataPropertyFilter>();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Filters\ControllerSaveTempDataPropertyFilterFactoryTest.cs (1)
33serviceCollection.AddTransient<ControllerSaveTempDataPropertyFilter>();
Microsoft.AspNetCore.OpenApi.Tests (9)
Transformers\DocumentTransformerTests.cs (2)
101var serviceCollection = new ServiceCollection().AddTransient<Dependency>(); 220var serviceCollection = new ServiceCollection().AddTransient<Dependency>();
Transformers\OperationTransformerTests.cs (2)
321var serviceCollection = new ServiceCollection().AddTransient<Dependency>(); 457var serviceCollection = new ServiceCollection().AddTransient<Dependency>();
Transformers\SchemaTransformerTests.cs (2)
324var serviceCollection = new ServiceCollection().AddTransient<Dependency>(); 832var serviceCollection = new ServiceCollection().AddTransient<Dependency>();
Transformers\TypeBasedTransformerLifetimeTests.cs (3)
86var serviceCollection = new ServiceCollection().AddTransient<Dependency>(); 184var serviceCollection = new ServiceCollection().AddTransient<Dependency>(); 305var serviceCollection = new ServiceCollection().AddTransient<Dependency>();
Microsoft.AspNetCore.Routing.Tests (2)
DefaultParameterPolicyFactoryTest.cs (2)
199services.AddTransient<CustomParameterPolicy>(); 388services.AddTransient<CustomParameterPolicy>();
Microsoft.AspNetCore.Server.HttpSys (1)
WebHostBuilderHttpSysExtensions.cs (1)
39services.AddTransient<AuthenticationHandler>();
Microsoft.AspNetCore.Server.IIS (1)
WebHostBuilderIISExtensions.cs (1)
41services.AddTransient<IISServerAuthenticationHandlerInternal>();
Microsoft.AspNetCore.TestHost.Tests (2)
TestServerTests.cs (2)
486services.AddTransient<TestService>(); 548.AddTransient<TestService>()
Microsoft.Extensions.Caching.Hybrid.Tests (4)
SampleUsage.cs (4)
18services.AddTransient<SomeDCService>(); 38services.AddTransient<SomeHCService>(); 58services.AddTransient<SomeHCServiceNoCapture>(); 78services.AddTransient<SomeHCServiceNoCaptureObjReuse>();
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
DefaultHealthCheckServiceTest.cs (1)
363b.Services.AddTransient<AnotherService>();
Microsoft.Extensions.Http.Diagnostics (1)
Latency\HttpClientLatencyTelemetryExtensions.cs (1)
35_ = services.AddTransient<HttpLatencyTelemetryHandler>();
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\Internal\HelperExtensions.cs (1)
16.AddTransient<NoRemoteCallHandler>()
Microsoft.Extensions.Http.Resilience.PerformanceTests (1)
HttpClientFactory.cs (1)
40.AddTransient<NoRemoteCallHandler>()
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (1)
DependencyInjectionExtensionsTests.cs (1)
261.AddTransient<Pooled<TestClass>>()
RoutingWebSite (1)
UseEndpointRoutingStartup.cs (1)
14services.AddTransient<EndsWithStringRouteConstraint>();
SocialWeather (1)
Startup.cs (1)
15services.AddTransient<PersistentConnectionLifeTimeManager>();