53 references to AddTransient
BasicWebSite (2)
StartupWithoutEndpointRouting.cs (2)
24services.AddTransient<IAuthorizationHandler, ManagerHandler>(); 40services.AddTransient<IAuthorizationHandler, ManagerHandler>();
ClaimsTransformation (1)
Startup.cs (1)
37services.AddTransient<IClaimsTransformation, ClaimsTransformer>();
CustomAuthorizationFailureResponse (4)
Startup.cs (4)
48services.AddTransient<IAuthorizationHandler, SampleRequirementHandler>(); 49services.AddTransient<IAuthorizationHandler, SampleWithCustomMessageRequirementHandler>(); 50services.AddTransient<IAuthorizationHandler, SampleWithFailureReasonRequirementHandler>(); 51services.AddTransient<IAuthorizationMiddlewareResultHandler, SampleAuthorizationMiddlewareResultHandler>();
IdentitySample.Mvc (2)
Startup.cs (2)
51services.AddTransient<IEmailSender, AuthMessageSender>(); 52services.AddTransient<ISmsSender, AuthMessageSender>();
Microsoft.AspNetCore (3)
WebHost.cs (3)
268services.AddTransient<IStartupFilter, HostFilteringStartupFilter>(); 269services.AddTransient<IStartupFilter, ForwardedHeadersStartupFilter>(); 270services.AddTransient<IConfigureOptions<ForwardedHeadersOptions>, ForwardedHeadersOptionsSetup>();
Microsoft.AspNetCore.Authentication.Test (1)
GoogleTests.cs (1)
1228services.AddTransient<IClaimsTransformation, ClaimsTransformer>();
Microsoft.AspNetCore.Authorization.Test (5)
AuthorizationMiddlewareTests.cs (1)
1038serviceCollection.AddTransient<IAuthorizationMiddlewareResultHandler, AuthorizationMiddlewareResultHandler>();
DefaultAuthorizationServiceTests.cs (4)
661services.AddTransient<IAuthorizationHandler, CustomHandler>(); 846services.AddTransient<IAuthorizationHandler, SuperUserHandler>(); 889services.AddTransient<IAuthorizationHandler, EvenHandler>(); 910services.AddTransient<IAuthorizationHandler, NotCalledHandler>();
Microsoft.AspNetCore.Hosting (3)
WebHostBuilder.cs (3)
291services.AddTransient<IApplicationBuilderFactory, ApplicationBuilderFactory>(); 292services.AddTransient<IHttpContextFactory, DefaultHttpContextFactory>(); 300services.AddTransient<IServiceProviderFactory<IServiceCollection>, DefaultServiceProviderFactory>();
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostTests.cs (2)
376s.AddTransient<IFakeService, FakeService>(); 729services.AddTransient<IStartup, TestStartup>();
Microsoft.AspNetCore.Http.Results.Tests (1)
src\Shared\ResultsTests\RedirectResultTestBase.cs (1)
64serviceCollection.AddTransient<ILoggerFactory, NullLoggerFactory>();
Microsoft.AspNetCore.Identity.Test (2)
UserManagerTest.cs (2)
20.AddTransient<IUserStore<PocoUser>, NoopUserStore>(); 35.AddTransient<IUserStore<PocoUser>, NoopUserStore>()
Microsoft.AspNetCore.Mvc.Core.Test (5)
LocalRedirectResultTest.cs (1)
141serviceCollection.AddTransient<ILoggerFactory, LoggerFactory>();
RedirectResultTest.cs (1)
30serviceCollection.AddTransient<ILoggerFactory, NullLoggerFactory>();
src\Shared\ResultsTests\RedirectResultTestBase.cs (1)
64serviceCollection.AddTransient<ILoggerFactory, NullLoggerFactory>();
VirtualFileResultTest.cs (2)
86.AddTransient<IActionResultExecutor<VirtualFileResult>, VirtualFileResultExecutor>() 87.AddTransient<ILoggerFactory, NullLoggerFactory>()
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
AuthorizeFilterIntegrationTest.cs (1)
183.AddTransient<ILogger<DefaultAuthorizationService>, Logger<DefaultAuthorizationService>>();
ModelBindingTestHelper.cs (1)
198.AddTransient<ILogger<DefaultAuthorizationService>, Logger<DefaultAuthorizationService>>();
Microsoft.AspNetCore.Mvc.Test (1)
MvcOptionsSetupTest.cs (1)
293.AddTransient<ILoggerFactory, LoggerFactory>()
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
ViewComponentResultTest.cs (1)
665services.AddTransient<IViewComponentHelper, DefaultViewComponentHelper>();
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheServiceCollectionExtensions.cs (1)
27services.AddTransient<IConfigureOptions<OutputCacheOptions>, OutputCacheOptionsSetup>();
Microsoft.AspNetCore.Routing.Tests (7)
DefaultParameterPolicyFactoryTest.cs (7)
218services.AddTransient<ITestService, TestService>(); 239services.AddTransient<ITestService, TestService>(); 262services.AddTransient<ITestService, TestService>(); 283services.AddTransient<ITestService, TestService>(); 304services.AddTransient<ITestService, TestService>(); 326services.AddTransient<ITestService, TestService>(); 347services.AddTransient<ITestService, TestService>();
Microsoft.AspNetCore.Server.Kestrel (1)
WebHostBuilderKestrelExtensions.cs (1)
87services.AddTransient<IConfigureOptions<KestrelServerOptions>, KestrelServerOptionsSetup>();
Microsoft.AspNetCore.TestHost.Tests (2)
TestServerTests.cs (2)
436services.AddTransient<IStartupFilter, RequestServicesFilter>(); 547services.AddTransient<IStartupFilter, NullServiceProvidersFeatureFilter>();
Microsoft.DotNet.Helix.Sdk.Tests (2)
InstallDotNetToolTests.cs (2)
245collection1.AddTransient<IHelpers, Microsoft.Arcade.Common.Helpers>(); 250collection2.AddTransient<IHelpers, Microsoft.Arcade.Common.Helpers>();
Microsoft.Extensions.ML (2)
Builder\BuilderExtensions.cs (2)
135builder.Services.AddTransient<UriModelLoader, UriModelLoader>(); 222builder.Services.AddTransient<FileModelLoader, FileModelLoader>();
Microsoft.Extensions.ServiceDiscovery (1)
ServiceDiscoveryServiceCollectionExtensions.cs (1)
97services.AddTransient<IValidateOptions<ConfigurationServiceEndpointProviderOptions>, ConfigurationServiceEndpointProviderOptionsValidator>();
Microsoft.ML.AutoML (2)
API\AutoMLExperimentExtension.cs (1)
195experiment.ServiceCollection.AddTransient<IPerformanceMonitor, TPerformanceMonitor>();
AutoMLExperiment\AutoMLExperiment.cs (1)
163_serviceCollection.AddTransient<ITrialRunner, TTrialRunner>();