32 references to AddTransient
Microsoft.AspNetCore.Authorization.Test (1)
AuthorizationMiddlewareResultHandlerTests.cs (1)
138
services.
AddTransient
(provider => authenticationService ?? new Mock<IAuthenticationService>().Object);
Microsoft.AspNetCore.Components.Web.Tests (4)
Virtualization\VirtualizeTest.cs (4)
24
.
AddTransient
((sp) => Mock.Of<IJSRuntime>())
43
.
AddTransient
((sp) => Mock.Of<IJSRuntime>())
62
.
AddTransient
((sp) => Mock.Of<IJSRuntime>())
83
.
AddTransient
((sp) => Mock.Of<IJSRuntime>())
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostTests.cs (2)
755
services.
AddTransient
<IStartupFilter>(serviceProvider => new TestFilter(
759
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.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.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);