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