74 references to AddTransient
aspire (12)
Program.cs (12)
140builder.Services.AddTransient<NewCommand>(); 141builder.Services.AddTransient<InitCommand>(); 142builder.Services.AddTransient<RunCommand>(); 143builder.Services.AddTransient<AddCommand>(); 144builder.Services.AddTransient<PublishCommand>(); 145builder.Services.AddTransient<ConfigCommand>(); 146builder.Services.AddTransient<CacheCommand>(); 147builder.Services.AddTransient<UpdateCommand>(); 148builder.Services.AddTransient<DeployCommand>(); 149builder.Services.AddTransient<ExecCommand>(); 150builder.Services.AddTransient<RootCommand>(); 151builder.Services.AddTransient<ExtensionInternalCommand>();
Aspire.Cli.Tests (12)
Utils\CliTestHelper.cs (12)
97services.AddTransient<RootCommand>(); 98services.AddTransient<NewCommand>(); 99services.AddTransient<InitCommand>(); 100services.AddTransient<RunCommand>(); 101services.AddTransient<ExecCommand>(); 102services.AddTransient<AddCommand>(); 103services.AddTransient<DeployCommand>(); 104services.AddTransient<PublishCommand>(); 105services.AddTransient<ConfigCommand>(); 106services.AddTransient<CacheCommand>(); 107services.AddTransient<UpdateCommand>(); 108services.AddTransient<ExtensionInternalCommand>();
Aspire.Dashboard (7)
DashboardWebApplication.cs (7)
272builder.Services.AddTransient<StructuredLogsViewModel>(); 274builder.Services.AddTransient<OtlpLogsService>(); 275builder.Services.AddTransient<OtlpTraceService>(); 276builder.Services.AddTransient<OtlpMetricsService>(); 279builder.Services.AddTransient<AssistantChatViewModel>(); 280builder.Services.AddTransient<AssistantChatDataContext>(); 282builder.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 (6)
ComponentFactoryTest.cs (2)
258.AddTransient<TestService1>() 259.AddTransient<TestService2>()
OwningComponentBaseTest.cs (4)
16services.AddTransient<MyService>(); 37services.AddTransient<MyService>(); 60services.AddTransient<MyService>(); 80services.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>();