54 references to AddTransient
Aspire.Cli.Tests (5)
Utils\CliTestHelper.cs (5)
95services.AddTransient(options.ExtensionBackchannelFactory); 103services.AddTransient(options.DotNetCliExecutionFactoryFactory); 104services.AddTransient(options.DotNetCliRunnerFactory); 105services.AddTransient(options.NuGetPackageCacheFactory); 223services.AddTransient(options.AppHostBackchannelFactory);
Microsoft.AspNetCore.Authorization.Test (1)
AuthorizationMiddlewareResultHandlerTests.cs (1)
138services.AddTransient(provider => authenticationService ?? new Mock<IAuthenticationService>().Object);
Microsoft.AspNetCore.Components.Web.Tests (18)
Virtualization\VirtualizeTest.cs (18)
25.AddTransient((sp) => Mock.Of<IJSRuntime>()) 44.AddTransient((sp) => Mock.Of<IJSRuntime>()) 63.AddTransient((sp) => Mock.Of<IJSRuntime>()) 84.AddTransient((sp) => Mock.Of<IJSRuntime>()) 115.AddTransient((sp) => Mock.Of<IJSRuntime>()) 150.AddTransient((sp) => Mock.Of<IJSRuntime>()) 344.AddTransient((sp) => Mock.Of<IJSRuntime>()) 379.AddTransient((sp) => Mock.Of<IJSRuntime>()) 411.AddTransient((sp) => Mock.Of<IJSRuntime>()) 451.AddTransient<IJSRuntime>((sp) => mockJs.Object) 504.AddTransient((sp) => Mock.Of<IJSRuntime>()) 571.AddTransient((sp) => Mock.Of<IJSRuntime>()) 608.AddTransient((sp) => Mock.Of<IJSRuntime>()) 653.AddTransient((sp) => Mock.Of<IJSRuntime>()) 709.AddTransient((sp) => Mock.Of<IJSRuntime>()) 745.AddTransient((sp) => Mock.Of<IJSRuntime>()) 892.AddTransient((sp) => Mock.Of<IJSRuntime>()) 937.AddTransient((sp) => Mock.Of<IJSRuntime>())
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostTests.cs (2)
757services.AddTransient<IStartupFilter>(serviceProvider => new TestFilter( 761services.AddTransient<IStartupFilter>(serviceProvider => new TestFilter(
Microsoft.AspNetCore.Mvc.Core.Test (1)
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (1)
68services.AddTransient<CustomTransformer>(s =>
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (1)
59services.AddTransient<CustomTransformer>(s =>
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)
448serviceCollection.AddTransient(_ =>
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (1)
DependencyInjectionExtensionsTests.cs (1)
262.AddTransient<ITestClass>(provider => provider.GetRequiredService<Pooled<TestClass>>().Object)
Microsoft.Extensions.Options (16)
OptionsBuilder.cs (16)
71Services.AddTransient<IConfigureOptions<TOptions>>(sp => 92Services.AddTransient<IConfigureOptions<TOptions>>(sp => 115Services.AddTransient<IConfigureOptions<TOptions>>( 145Services.AddTransient<IConfigureOptions<TOptions>>( 178Services.AddTransient<IConfigureOptions<TOptions>>( 220Services.AddTransient<IPostConfigureOptions<TOptions>>(sp => 241Services.AddTransient<IPostConfigureOptions<TOptions>>(sp => 264Services.AddTransient<IPostConfigureOptions<TOptions>>( 294Services.AddTransient<IPostConfigureOptions<TOptions>>( 327Services.AddTransient<IPostConfigureOptions<TOptions>>( 352Services.AddTransient<IValidateOptions<TOptions>>(sp => 399Services.AddTransient<IValidateOptions<TOptions>>(sp => 430Services.AddTransient<IValidateOptions<TOptions>>(sp => 469Services.AddTransient<IValidateOptions<TOptions>>(sp => 513Services.AddTransient<IValidateOptions<TOptions>>(sp => 562Services.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);