132 references to AddTransient
aspire (39)
Program.cs (39)
339builder.Services.AddTransient<NewCommand>(); 340builder.Services.AddTransient<InitCommand>(); 341builder.Services.AddTransient<RunCommand>(); 342builder.Services.AddTransient<StopCommand>(); 343builder.Services.AddTransient<StartCommand>(); 344builder.Services.AddTransient<RestartCommand>(); 345builder.Services.AddTransient<ResourceCommand>(); 346builder.Services.AddTransient<PsCommand>(); 347builder.Services.AddTransient<ResourcesCommand>(); 348builder.Services.AddTransient<LogsCommand>(); 349builder.Services.AddTransient<AddCommand>(); 350builder.Services.AddTransient<PublishCommand>(); 351builder.Services.AddTransient<ConfigCommand>(); 352builder.Services.AddTransient<CacheCommand>(); 353builder.Services.AddTransient<DoctorCommand>(); 354builder.Services.AddTransient<UpdateCommand>(); 355builder.Services.AddTransient<DeployCommand>(); 356builder.Services.AddTransient<DoCommand>(); 357builder.Services.AddTransient<ExecCommand>(); 358builder.Services.AddTransient<McpCommand>(); 359builder.Services.AddTransient<McpStartCommand>(); 360builder.Services.AddTransient<McpInitCommand>(); 361builder.Services.AddTransient<AgentCommand>(); 362builder.Services.AddTransient<AgentMcpCommand>(); 363builder.Services.AddTransient<AgentInitCommand>(); 364builder.Services.AddTransient<TelemetryCommand>(); 365builder.Services.AddTransient<TelemetryLogsCommand>(); 366builder.Services.AddTransient<TelemetrySpansCommand>(); 367builder.Services.AddTransient<TelemetryTracesCommand>(); 368builder.Services.AddTransient<DocsCommand>(); 369builder.Services.AddTransient<DocsListCommand>(); 370builder.Services.AddTransient<DocsSearchCommand>(); 371builder.Services.AddTransient<DocsGetCommand>(); 372builder.Services.AddTransient<SdkCommand>(); 373builder.Services.AddTransient<SdkGenerateCommand>(); 374builder.Services.AddTransient<SdkDumpCommand>(); 375builder.Services.AddTransient<SetupCommand>(); 376builder.Services.AddTransient<RootCommand>(); 377builder.Services.AddTransient<ExtensionInternalCommand>();
Aspire.Cli.Tests (39)
Utils\CliTestHelper.cs (39)
162services.AddTransient<RootCommand>(); 163services.AddTransient<NewCommand>(); 164services.AddTransient<InitCommand>(); 165services.AddTransient<RunCommand>(); 166services.AddTransient<StopCommand>(); 167services.AddTransient<StartCommand>(); 168services.AddTransient<RestartCommand>(); 169services.AddTransient<ResourceCommand>(); 170services.AddTransient<PsCommand>(); 171services.AddTransient<ResourcesCommand>(); 172services.AddTransient<LogsCommand>(); 173services.AddTransient<ExecCommand>(); 174services.AddTransient<AddCommand>(); 175services.AddTransient<DeployCommand>(); 176services.AddTransient<DoCommand>(); 177services.AddTransient<PublishCommand>(); 178services.AddTransient<ConfigCommand>(); 179services.AddTransient<CacheCommand>(); 180services.AddTransient<DoctorCommand>(); 181services.AddTransient<UpdateCommand>(); 182services.AddTransient<SetupCommand>(); 183services.AddTransient<McpCommand>(); 184services.AddTransient<McpStartCommand>(); 185services.AddTransient<McpInitCommand>(); 186services.AddTransient<AgentCommand>(); 187services.AddTransient<AgentMcpCommand>(); 188services.AddTransient<AgentInitCommand>(); 189services.AddTransient<TelemetryCommand>(); 190services.AddTransient<TelemetryLogsCommand>(); 191services.AddTransient<TelemetrySpansCommand>(); 192services.AddTransient<TelemetryTracesCommand>(); 193services.AddTransient<ExtensionInternalCommand>(); 194services.AddTransient<SdkCommand>(); 195services.AddTransient<SdkGenerateCommand>(); 196services.AddTransient<SdkDumpCommand>(); 197services.AddTransient<DocsCommand>(); 198services.AddTransient<DocsListCommand>(); 199services.AddTransient<DocsSearchCommand>(); 200services.AddTransient<DocsGetCommand>();
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.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>();