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