51 references to AddTransient
Aspire.Cli.Tests (5)
Utils\CliTestHelper.cs (5)
95
services.
AddTransient
(options.ExtensionBackchannelFactory);
103
services.
AddTransient
(options.DotNetCliExecutionFactoryFactory);
104
services.
AddTransient
(options.DotNetCliRunnerFactory);
105
services.
AddTransient
(options.NuGetPackageCacheFactory);
223
services.
AddTransient
(options.AppHostBackchannelFactory);
Microsoft.AspNetCore.Authorization.Test (1)
AuthorizationMiddlewareResultHandlerTests.cs (1)
138
services.
AddTransient
(provider => authenticationService ?? new Mock<IAuthenticationService>().Object);
Microsoft.AspNetCore.Components.Web.Tests (16)
Virtualization\VirtualizeTest.cs (16)
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>())
450
.
AddTransient
<IJSRuntime>((sp) => mockJs.Object)
503
.
AddTransient
((sp) => Mock.Of<IJSRuntime>())
570
.
AddTransient
((sp) => Mock.Of<IJSRuntime>())
607
.
AddTransient
((sp) => Mock.Of<IJSRuntime>())
652
.
AddTransient
((sp) => Mock.Of<IJSRuntime>())
708
.
AddTransient
((sp) => Mock.Of<IJSRuntime>())
744
.
AddTransient
((sp) => Mock.Of<IJSRuntime>())
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostTests.cs (2)
757
services.
AddTransient
<IStartupFilter>(serviceProvider => new TestFilter(
761
services.
AddTransient
<IStartupFilter>(serviceProvider => new TestFilter(
Microsoft.AspNetCore.Mvc.Core.Test (1)
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (1)
68
services.
AddTransient
<CustomTransformer>(s =>
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (1)
59
services.
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)
53
builder.Services.
AddTransient
<IConfigureOptions<HttpClientFactoryOptions>>(services =>
375
builder.Services.
AddTransient
(s => AddTransientHelper<TClient>(s, builder));
439
builder.Services.
AddTransient
(s => AddTransientHelper<TClient, TImplementation>(s, builder));
490
builder.Services.
AddTransient
<TClient>(s =>
539
builder.Services.
AddTransient
<TClient>(s =>
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\HttpClientLoggingExtensionsTest.cs (1)
448
serviceCollection.
AddTransient
(_ =>
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (1)
DependencyInjectionExtensionsTests.cs (1)
262
.
AddTransient
<ITestClass>(provider => provider.GetRequiredService<Pooled<TestClass>>().Object)
Microsoft.Extensions.Options (15)
OptionsBuilder.cs (15)
70
Services.
AddTransient
<IConfigureOptions<TOptions>>(sp =>
91
Services.
AddTransient
<IConfigureOptions<TOptions>>(sp =>
114
Services.
AddTransient
<IConfigureOptions<TOptions>>(
144
Services.
AddTransient
<IConfigureOptions<TOptions>>(
177
Services.
AddTransient
<IConfigureOptions<TOptions>>(
219
Services.
AddTransient
<IPostConfigureOptions<TOptions>>(sp =>
240
Services.
AddTransient
<IPostConfigureOptions<TOptions>>(sp =>
263
Services.
AddTransient
<IPostConfigureOptions<TOptions>>(
293
Services.
AddTransient
<IPostConfigureOptions<TOptions>>(
326
Services.
AddTransient
<IPostConfigureOptions<TOptions>>(
380
Services.
AddTransient
<IValidateOptions<TOptions>>(sp =>
411
Services.
AddTransient
<IValidateOptions<TOptions>>(sp =>
450
Services.
AddTransient
<IValidateOptions<TOptions>>(sp =>
494
Services.
AddTransient
<IValidateOptions<TOptions>>(sp =>
543
Services.
AddTransient
<IValidateOptions<TOptions>>(sp =>
Microsoft.ML.AutoML (2)
API\AutoMLExperimentExtension.cs (1)
181
experiment.ServiceCollection.
AddTransient
<IPerformanceMonitor>(factory);
AutoMLExperiment\AutoMLExperiment.cs (1)
155
_serviceCollection.
AddTransient
<ITrialRunner>(factory);