53 references to AddTransient
aspire (2)
Program.cs (2)
500builder.Services.AddTransient<IProcessTreeGracefulShutdownSignaler>(sp => sp.GetRequiredService<ProcessTreeGracefulShutdownService>()); 502builder.Services.AddTransient<IAppHostStopper>(sp => sp.GetRequiredService<ProcessTreeGracefulShutdownService>());
Aspire.Cli.Tests (7)
Utils\CliTestHelper.cs (7)
151services.AddTransient(options.ExtensionBackchannelFactory); 159services.AddTransient(options.DotNetCliExecutionFactoryFactory); 160services.AddTransient(options.DotNetCliRunnerFactory); 162services.AddTransient(options.NuGetPackageCacheFactory); 223services.AddTransient<IProcessTreeGracefulShutdownSignaler>(sp => sp.GetRequiredService<ProcessTreeGracefulShutdownService>()); 224services.AddTransient<IAppHostStopper>(sp => sp.GetRequiredService<ProcessTreeGracefulShutdownService>()); 376services.AddTransient(options.AppHostBackchannelFactory);
Aspire.Hosting.Tests (13)
Pipelines\PipelineOutputDiffingLifetimeTests.cs (4)
39builder.Services.AddTransient<IPipelineOutputSnapshotter<LifetimeSnapshot>>(_ => 46builder.Services.AddTransient<IPipelineOutputComparer<LifetimeSnapshot>>(_ => 147builder.Services.AddTransient<IPipelineOutputSnapshotter<LifetimeSnapshot>>(_ => 153builder.Services.AddTransient<IPipelineOutputComparer<LifetimeSnapshot>>(_ =>
Pipelines\PipelineOutputDiffingTests.cs (8)
307builder.Services.AddTransient<IPipelineOutputSnapshotter<PipelineOutputSnapshot>>(_ => throw new InvalidOperationException("typed snapshotter resolved")); 308builder.Services.AddTransient<IPipelineOutputComparer<PipelineOutputSnapshot>>(_ => throw new InvalidOperationException("comparer resolved")); 366builder.Services.AddTransient<IPipelineOutputSnapshotter<PipelineOutputSnapshot>>(_ => throw new InvalidOperationException("typed snapshotter resolved")); 367builder.Services.AddTransient<IPipelineOutputComparer<PipelineOutputSnapshot>>(_ => throw new InvalidOperationException("comparer resolved")); 737builder.Services.AddTransient<IPipelineOutputSnapshotter<RecordingSnapshot>>(_ => 779builder.Services.AddTransient<IPipelineOutputSnapshotter<RecordingSnapshot>>(_ => 785builder.Services.AddTransient<IPipelineOutputComparer<RecordingSnapshot>>(_ => 976builder.Services.AddTransient<IPipelineOutputSnapshotter<GitSnapshot>>(_ => new GitSnapshotter(workspace.Path));
Pipelines\PipelineOutputResolutionTests.cs (1)
42builder.Services.AddTransient<IPipelineOutputSnapshotter<ContentSnapshot>>(Create);
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Extensions\ServiceCollectionDescriptorExtensions.cs (1)
202/// <seealso cref="ServiceCollectionServiceExtensions.AddTransient{TService}(IServiceCollection, Func{IServiceProvider, TService})"/>
Microsoft.Extensions.Http (5)
DependencyInjection\HttpClientBuilderExtensions.cs (5)
53builder.Services.AddTransient<IConfigureOptions<HttpClientFactoryOptions>>(services => 375builder.Services.AddTransient(s => AddTransientHelper<TClient>(s, builder)); 439builder.Services.AddTransient(s => AddTransientHelper<TClient, TImplementation>(s, builder)); 490builder.Services.AddTransient<TClient>(s => 539builder.Services.AddTransient<TClient>(s =>
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\HttpClientLoggingExtensionsTest.cs (1)
692serviceCollection.AddTransient(_ =>
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (1)
DependencyInjectionExtensionsTests.cs (1)
262.AddTransient<ITestClass>(provider => provider.GetRequiredService<Pooled<TestClass>>().Object)
Microsoft.Extensions.Options (21)
OptionsBuilder.cs (21)
73Services.AddTransient<IConfigureOptions<TOptions>>(sp => 94Services.AddTransient<IConfigureOptions<TOptions>>(sp => 117Services.AddTransient<IConfigureOptions<TOptions>>( 147Services.AddTransient<IConfigureOptions<TOptions>>( 180Services.AddTransient<IConfigureOptions<TOptions>>( 222Services.AddTransient<IPostConfigureOptions<TOptions>>(sp => 243Services.AddTransient<IPostConfigureOptions<TOptions>>(sp => 266Services.AddTransient<IPostConfigureOptions<TOptions>>( 296Services.AddTransient<IPostConfigureOptions<TOptions>>( 329Services.AddTransient<IPostConfigureOptions<TOptions>>( 362Services.AddTransient<IValidateOptions<TOptions>>(sp => 418Services.AddTransient<IValidateOptions<TOptions>>(sp => 449Services.AddTransient<IValidateOptions<TOptions>>(sp => 488Services.AddTransient<IValidateOptions<TOptions>>(sp => 532Services.AddTransient<IValidateOptions<TOptions>>(sp => 581Services.AddTransient<IValidateOptions<TOptions>>(sp => 672Services.AddTransient<IValidateOptions<TOptions>>(sp => 725Services.AddTransient<IValidateOptions<TOptions>>(sp => 783Services.AddTransient<IValidateOptions<TOptions>>(sp => 846Services.AddTransient<IValidateOptions<TOptions>>(sp => 914Services.AddTransient<IValidateOptions<TOptions>>(sp =>
Microsoft.ML.AutoML (2)
API\AutoMLExperimentExtension.cs (1)
181experiment.ServiceCollection.AddTransient<IPerformanceMonitor>(factory);
AutoMLExperiment\AutoMLExperiment.cs (1)
155_serviceCollection.AddTransient<ITrialRunner>(factory);