29 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 => 379builder.Services.AddTransient(s => AddTransientHelper<TClient>(s, builder)); 443builder.Services.AddTransient(s => AddTransientHelper<TClient, TImplementation>(s, builder)); 494builder.Services.AddTransient<TClient>(s => 543builder.Services.AddTransient<TClient>(s =>
Microsoft.Extensions.Options (15)
OptionsBuilder.cs (15)
66Services.AddTransient<IConfigureOptions<TOptions>>(sp => 85Services.AddTransient<IConfigureOptions<TOptions>>(sp => 106Services.AddTransient<IConfigureOptions<TOptions>>( 134Services.AddTransient<IConfigureOptions<TOptions>>( 165Services.AddTransient<IConfigureOptions<TOptions>>( 203Services.AddTransient<IPostConfigureOptions<TOptions>>(sp => 222Services.AddTransient<IPostConfigureOptions<TOptions>>(sp => 243Services.AddTransient<IPostConfigureOptions<TOptions>>( 271Services.AddTransient<IPostConfigureOptions<TOptions>>( 302Services.AddTransient<IPostConfigureOptions<TOptions>>( 356Services.AddTransient<IValidateOptions<TOptions>>(sp => 387Services.AddTransient<IValidateOptions<TOptions>>(sp => 426Services.AddTransient<IValidateOptions<TOptions>>(sp => 470Services.AddTransient<IValidateOptions<TOptions>>(sp => 519Services.AddTransient<IValidateOptions<TOptions>>(sp =>