40 references to AddTransient
aspire (2)
Program.cs (2)
459builder.Services.AddTransient<IProcessTreeGracefulShutdownSignaler>(sp => sp.GetRequiredService<ProcessTreeGracefulShutdownService>()); 461builder.Services.AddTransient<IAppHostStopper>(sp => sp.GetRequiredService<ProcessTreeGracefulShutdownService>());
Aspire.Cli.Tests (7)
Utils\CliTestHelper.cs (7)
141services.AddTransient(options.ExtensionBackchannelFactory); 149services.AddTransient(options.DotNetCliExecutionFactoryFactory); 150services.AddTransient(options.DotNetCliRunnerFactory); 151services.AddTransient(options.NuGetPackageCacheFactory); 200services.AddTransient<IProcessTreeGracefulShutdownSignaler>(sp => sp.GetRequiredService<ProcessTreeGracefulShutdownService>()); 201services.AddTransient<IAppHostStopper>(sp => sp.GetRequiredService<ProcessTreeGracefulShutdownService>()); 341services.AddTransient(options.AppHostBackchannelFactory);
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)
690serviceCollection.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>>( 357Services.AddTransient<IValidateOptions<TOptions>>(sp => 413Services.AddTransient<IValidateOptions<TOptions>>(sp => 444Services.AddTransient<IValidateOptions<TOptions>>(sp => 483Services.AddTransient<IValidateOptions<TOptions>>(sp => 527Services.AddTransient<IValidateOptions<TOptions>>(sp => 576Services.AddTransient<IValidateOptions<TOptions>>(sp => 631Services.AddTransient<IValidateOptions<TOptions>>(sp => 666Services.AddTransient<IValidateOptions<TOptions>>(sp => 706Services.AddTransient<IValidateOptions<TOptions>>(sp => 751Services.AddTransient<IValidateOptions<TOptions>>(sp => 801Services.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);