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