77 references to AddTransient
aspire (10)
Program.cs (10)
136builder.Services.AddTransient<NewCommand>(); 137builder.Services.AddTransient<RunCommand>(); 138builder.Services.AddTransient<AddCommand>(); 139builder.Services.AddTransient<PublishCommand>(); 140builder.Services.AddTransient<ConfigCommand>(); 141builder.Services.AddTransient<UpdateCommand>(); 142builder.Services.AddTransient<DeployCommand>(); 143builder.Services.AddTransient<ExecCommand>(); 144builder.Services.AddTransient<RootCommand>(); 145builder.Services.AddTransient<ExtensionInternalCommand>();
Aspire.Cli.Tests (10)
Utils\CliTestHelper.cs (10)
91services.AddTransient<RootCommand>(); 92services.AddTransient<NewCommand>(); 93services.AddTransient<RunCommand>(); 94services.AddTransient<ExecCommand>(); 95services.AddTransient<AddCommand>(); 96services.AddTransient<DeployCommand>(); 97services.AddTransient<PublishCommand>(); 98services.AddTransient<ConfigCommand>(); 99services.AddTransient<UpdateCommand>(); 100services.AddTransient<ExtensionInternalCommand>();
Aspire.Dashboard (5)
DashboardWebApplication.cs (5)
264builder.Services.AddTransient<StructuredLogsViewModel>(); 266builder.Services.AddTransient<OtlpLogsService>(); 267builder.Services.AddTransient<OtlpTraceService>(); 268builder.Services.AddTransient<OtlpMetricsService>(); 270builder.Services.AddTransient<TracesViewModel>();
BasicTestApp (1)
Program.cs (1)
46builder.Services.AddTransient<FormsTest.ValidationComponentDI.SaladChef>();
BasicWebSite (1)
StartupWithoutEndpointRouting.cs (1)
50services.AddTransient<ServiceActionFilter>();
ControllersFromServicesWebSite (2)
Startup.cs (2)
37services.AddTransient<QueryValueService>(); 38services.AddTransient<ValueService>();
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>>()
Mvc.RoutingWebSite (3)
StartupForDynamic.cs (1)
19services.AddTransient<Transformer>();
StartupForDynamicAndRazorPages.cs (1)
16services.AddTransient<Transformer>();
StartupForDynamicOrder.cs (1)
34services.AddTransient<Transformer>();
RazorWebSite (3)
Startup.cs (3)
35services.AddTransient<InjectedHelper>(); 36services.AddTransient<TaskReturningService>(); 37services.AddTransient<FrameworkSpecificHelper>();
RoutingWebSite (1)
UseEndpointRoutingStartup.cs (1)
14services.AddTransient<EndsWithStringRouteConstraint>();
SocialWeather (1)
Startup.cs (1)
15services.AddTransient<PersistentConnectionLifeTimeManager>();