165 references to AddTransient
aspire (55)
Program.cs (55)
438builder.Services.AddTransient<AppHostLauncher>(); 439builder.Services.AddTransient<NewCommand>(); 440builder.Services.AddTransient<InitCommand>(); 441builder.Services.AddTransient<RunCommand>(); 442builder.Services.AddTransient<StopCommand>(); 443builder.Services.AddTransient<StartCommand>(); 444builder.Services.AddTransient<WaitCommand>(); 445builder.Services.AddTransient<ResourceCommand>(); 446builder.Services.AddTransient<PsCommand>(); 447builder.Services.AddTransient<DescribeCommand>(); 448builder.Services.AddTransient<LogsCommand>(); 449builder.Services.AddTransient<AddCommand>(); 450builder.Services.AddTransient<PublishCommand>(); 451builder.Services.AddTransient<ConfigCommand>(); 452builder.Services.AddTransient<CacheCommand>(); 453builder.Services.AddTransient<CertificatesCommand>(); 454builder.Services.AddTransient<CertificatesCleanCommand>(); 455builder.Services.AddTransient<CertificatesTrustCommand>(); 456builder.Services.AddTransient<DoctorCommand>(); 457builder.Services.AddTransient<UpdateCommand>(); 458builder.Services.AddTransient<DeployCommand>(); 459builder.Services.AddTransient<DoCommand>(); 460builder.Services.AddTransient<ExecCommand>(); 461builder.Services.AddTransient<McpCommand>(); 462builder.Services.AddTransient<McpStartCommand>(); 463builder.Services.AddTransient<McpInitCommand>(); 464builder.Services.AddTransient<McpToolsCommand>(); 465builder.Services.AddTransient<McpCallCommand>(); 466builder.Services.AddTransient<AgentCommand>(); 467builder.Services.AddTransient<AgentMcpCommand>(); 468builder.Services.AddTransient<AgentInitCommand>(); 469builder.Services.AddTransient<TelemetryCommand>(); 470builder.Services.AddTransient<TelemetryLogsCommand>(); 471builder.Services.AddTransient<TelemetrySpansCommand>(); 472builder.Services.AddTransient<TelemetryTracesCommand>(); 473builder.Services.AddTransient<ExportCommand>(); 474builder.Services.AddTransient<DocsCommand>(); 475builder.Services.AddTransient<DocsListCommand>(); 476builder.Services.AddTransient<DocsSearchCommand>(); 477builder.Services.AddTransient<DocsGetCommand>(); 478builder.Services.AddTransient<SecretCommand>(); 479builder.Services.AddTransient<SecretSetCommand>(); 480builder.Services.AddTransient<SecretGetCommand>(); 481builder.Services.AddTransient<SecretListCommand>(); 482builder.Services.AddTransient<SecretPathCommand>(); 483builder.Services.AddTransient<SecretDeleteCommand>(); 484builder.Services.AddTransient<SecretStoreResolver>(); 485builder.Services.AddTransient<SdkCommand>(); 486builder.Services.AddTransient<SdkGenerateCommand>(); 487builder.Services.AddTransient<SdkDumpCommand>(); 488builder.Services.AddTransient<RestoreCommand>(); 489builder.Services.AddTransient<SetupCommand>(); 491builder.Services.AddTransient<RenderCommand>(); 493builder.Services.AddTransient<RootCommand>(); 494builder.Services.AddTransient<ExtensionInternalCommand>();
Aspire.Cli.Tests (55)
Utils\CliTestHelper.cs (55)
165services.AddTransient<RootCommand>(); 166services.AddTransient<NewCommand>(); 167services.AddTransient<InitCommand>(); 168services.AddTransient<AppHostLauncher>(); 169services.AddTransient<RunCommand>(); 170services.AddTransient<StopCommand>(); 171services.AddTransient<StartCommand>(); 172services.AddTransient<ResourceCommand>(); 173services.AddTransient<PsCommand>(); 174services.AddTransient<DescribeCommand>(); 175services.AddTransient<LogsCommand>(); 176services.AddTransient<ExecCommand>(); 177services.AddTransient<AddCommand>(); 178services.AddTransient<DeployCommand>(); 179services.AddTransient<DoCommand>(); 180services.AddTransient<PublishCommand>(); 181services.AddTransient<ConfigCommand>(); 182services.AddTransient<CacheCommand>(); 183services.AddTransient<CertificatesCommand>(); 184services.AddTransient<CertificatesCleanCommand>(); 185services.AddTransient<CertificatesTrustCommand>(); 186services.AddTransient<DoctorCommand>(); 187services.AddTransient<UpdateCommand>(); 188services.AddTransient<SetupCommand>(); 189services.AddTransient<McpCommand>(); 190services.AddTransient<McpStartCommand>(); 191services.AddTransient<McpInitCommand>(); 192services.AddTransient<McpToolsCommand>(); 193services.AddTransient<McpCallCommand>(); 194services.AddTransient<AgentCommand>(); 195services.AddTransient<AgentMcpCommand>(); 196services.AddTransient<AgentInitCommand>(); 198services.AddTransient<TelemetryCommand>(); 199services.AddTransient<TelemetryLogsCommand>(); 200services.AddTransient<TelemetrySpansCommand>(); 201services.AddTransient<TelemetryTracesCommand>(); 202services.AddTransient<ExportCommand>(); 203services.AddTransient<ExtensionInternalCommand>(); 204services.AddTransient<WaitCommand>(); 205services.AddTransient<RestoreCommand>(); 206services.AddTransient<SdkCommand>(); 207services.AddTransient<SdkGenerateCommand>(); 208services.AddTransient<SdkDumpCommand>(); 209services.AddTransient<DocsCommand>(); 210services.AddTransient<DocsListCommand>(); 211services.AddTransient<DocsSearchCommand>(); 212services.AddTransient<DocsGetCommand>(); 213services.AddTransient<SecretCommand>(); 214services.AddTransient<SecretSetCommand>(); 215services.AddTransient<SecretGetCommand>(); 216services.AddTransient<SecretListCommand>(); 217services.AddTransient<SecretPathCommand>(); 218services.AddTransient<SecretDeleteCommand>(); 219services.AddTransient<SecretStoreResolver>(); 221services.AddTransient<RenderCommand>();
Aspire.Dashboard (7)
DashboardWebApplication.cs (7)
285builder.Services.AddTransient<StructuredLogsViewModel>(); 287builder.Services.AddTransient<OtlpLogsService>(); 288builder.Services.AddTransient<OtlpTraceService>(); 289builder.Services.AddTransient<OtlpMetricsService>(); 295builder.Services.AddTransient<AssistantChatViewModel>(); 296builder.Services.AddTransient<AssistantChatDataContext>(); 298builder.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.DependencyInjection.Abstractions (1)
Extensions\ServiceCollectionDescriptorExtensions.cs (1)
167/// <seealso cref="ServiceCollectionServiceExtensions.AddTransient{TService}(IServiceCollection)"/>
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 (2)
Logging\HttpClientLoggingExtensionsTest.cs (1)
457serviceCollection.AddTransient<TestRetryHandler>();
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>();