32 references to AddTransient
Microsoft.AspNetCore.Authorization.Test (1)
AuthorizationMiddlewareResultHandlerTests.cs (1)
138services.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)
755services.AddTransient<IStartupFilter>(serviceProvider => new TestFilter( 759services.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.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.ObjectPool.DependencyInjection.Tests (1)
DependencyInjectionExtensionsTests.cs (1)
262.AddTransient<ITestClass>(provider => provider.GetRequiredService<Pooled<TestClass>>().Object)
Microsoft.Extensions.Options (15)
OptionsBuilder.cs (15)
70Services.AddTransient<IConfigureOptions<TOptions>>(sp => 91Services.AddTransient<IConfigureOptions<TOptions>>(sp => 114Services.AddTransient<IConfigureOptions<TOptions>>( 144Services.AddTransient<IConfigureOptions<TOptions>>( 177Services.AddTransient<IConfigureOptions<TOptions>>( 219Services.AddTransient<IPostConfigureOptions<TOptions>>(sp => 240Services.AddTransient<IPostConfigureOptions<TOptions>>(sp => 263Services.AddTransient<IPostConfigureOptions<TOptions>>( 293Services.AddTransient<IPostConfigureOptions<TOptions>>( 326Services.AddTransient<IPostConfigureOptions<TOptions>>( 380Services.AddTransient<IValidateOptions<TOptions>>(sp => 411Services.AddTransient<IValidateOptions<TOptions>>(sp => 450Services.AddTransient<IValidateOptions<TOptions>>(sp => 494Services.AddTransient<IValidateOptions<TOptions>>(sp => 543Services.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);