ASP.NET Core中的依賴注入能夠說是無處不在,其經過建立一個ServiceCollection對象並將服務註冊信息以ServiceDescriptor對象的形式添加在其中,其次針對ServiceCollection對象建立對應的ServiceProvider,經過ServiceProvider提供咱們須要的服務實例。ios
這裏經過IServiceCollection來查看一下 其默認註冊了哪些服務。cookie
dotnet new mvc -o projectname
Microsoft.Extensions.DependencyInjection中提供不少IServiceCollection的擴展方法來添加服務註冊。如:mvc
/// <summary> /// Adds MVC services to the specified <see cref="IServiceCollection" />. /// </summary> /// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param> /// <returns>An <see cref="IMvcBuilder"/> that can be used to further configure the MVC services.</returns> public static IMvcBuilder AddMvc(this IServiceCollection services) { if (services == null) { throw new ArgumentNullException(nameof(services)); } services.AddControllersWithViews(); return services.AddRazorPages(); } public static IMvcBuilder AddControllers(this IServiceCollection services) { if (services == null) { throw new ArgumentNullException(nameof(services)); } var builder = AddControllersCore(services); return new MvcBuilder(builder.Services, builder.PartManager); }
private IServiceCollection _services; public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.Configure<CookiePolicyOptions>(options => { // This lambda determines whether user consent for non-essential cookies is needed for a given request. options.CheckConsentNeeded = context => true; options.MinimumSameSitePolicy = SameSiteMode.None; }); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); _services = services; } public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { var _logger = loggerFactory.CreateLogger("Services"); _logger.LogInformation($"Total Services Registered: {_services.Count}"); foreach (var service in _services) { _logger.LogInformation($"Service: {service.ServiceType.FullName}\n Lifetime: {service.Lifetime}\n Instance: {service.ImplementationType?.FullName}"); } if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); }
類型 | 生命週期 | Instance |
---|---|---|
Microsoft.AspNetCore.Hosting.Internal.WebHostOptions | Singleton | |
Microsoft.AspNetCore.Hosting.IHostingEnvironment | Singleton | |
Microsoft.Extensions.Hosting.IHostingEnvironment | Singleton | |
Microsoft.AspNetCore.Hosting.WebHostBuilderContext | Singleton | |
Microsoft.Extensions.Configuration.IConfiguration | Singleton | |
Microsoft.AspNetCore.Hosting.Builder.IApplicationBuilderFactory | Transient | Microsoft.AspNetCore.Hosting.Builder.ApplicationBuilderFactory |
Microsoft.AspNetCore.Http.IHttpContextFactory | Transient | Microsoft.AspNetCore.Http.HttpContextFactory |
Microsoft.AspNetCore.Http.IMiddlewareFactory | Scoped | Microsoft.AspNetCore.Http.MiddlewareFactory |
Microsoft.Extensions.Options.IOptions`1 | Singleton | Microsoft.Extensions.Options.OptionsManager`1 |
Microsoft.Extensions.Options.IOptionsSnapshot`1 | Scoped | Microsoft.Extensions.Options.OptionsManager`1 |
Microsoft.Extensions.Options.IOptionsMonitor`1 | Singleton | Microsoft.Extensions.Options.OptionsMonitor`1 |
Microsoft.Extensions.Options.IOptionsFactory`1 | Transient | Microsoft.Extensions.Options.OptionsFactory`1 |
Microsoft.Extensions.Options.IOptionsMonitorCache`1 | Singleton | Microsoft.Extensions.Options.OptionsCache`1 |
Microsoft.Extensions.Logging.ILoggerFactory | Singleton | Microsoft.Extensions.Logging.LoggerFactory |
Microsoft.Extensions.Logging.ILogger`1 | Singleton | Microsoft.Extensions.Logging.Logger`1 |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.Extensions.Logging.LoggerFilterOptions, Microsoft.Extensions.Logging, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
Microsoft.AspNetCore.Hosting.IStartupFilter | Transient | Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter |
Microsoft.Extensions.ObjectPool.ObjectPoolProvider | Singleton | Microsoft.Extensions.ObjectPool.DefaultObjectPoolProvider |
Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ITransportFactory | Singleton | Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions, Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Server.Kestrel.Core.Internal.KestrelServerOptionsSetup |
Microsoft.AspNetCore.Hosting.Server.IServer | Singleton | Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions, Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
Microsoft.Extensions.Logging.Configuration.ILoggerProviderConfigurationFactory | Singleton | Microsoft.Extensions.Logging.Configuration.LoggerProviderConfigurationFactory |
Microsoft.Extensions.Logging.Configuration.ILoggerProviderConfiguration`1 | Singleton | Microsoft.Extensions.Logging.Configuration.LoggerProviderConfiguration`1 |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.Extensions.Logging.LoggerFilterOptions, Microsoft.Extensions.Logging, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
Microsoft.Extensions.Options.IOptionsChangeTokenSource`1[[Microsoft.Extensions.Logging.LoggerFilterOptions, Microsoft.Extensions.Logging, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
Microsoft.Extensions.Logging.Configuration.LoggingConfiguration | Singleton | |
Microsoft.Extensions.Logging.ILoggerProvider | Singleton | Microsoft.Extensions.Logging.Console.ConsoleLoggerProvider |
Microsoft.Extensions.Options.IConfigureOptions`1 | Singleton | Microsoft.Extensions.Logging.Console.ConsoleLoggerOptionsSetup |
Microsoft.Extensions.Options.IOptionsChangeTokenSource`1[[Microsoft.Extensions.Logging.Console.ConsoleLoggerOptions, Microsoft.Extensions.Logging.Console, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.Extensions.Logging.Configuration.LoggerProviderOptionsChangeTokenSource`2[[Microsoft.Extensions.Logging.Console.ConsoleLoggerOptions, Microsoft.Extensions.Logging.Console, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.Extensions.Logging.Console.ConsoleLoggerProvider, Microsoft.Extensions.Logging.Console, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] |
Microsoft.Extensions.Logging.ILoggerProvider | Singleton | Microsoft.Extensions.Logging.Debug.DebugLoggerProvider |
Microsoft.Extensions.Logging.EventSource.LoggingEventSource | Singleton | |
Microsoft.Extensions.Logging.ILoggerProvider | Singleton | Microsoft.Extensions.Logging.EventSource.EventSourceLoggerProvider |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.Extensions.Logging.LoggerFilterOptions, Microsoft.Extensions.Logging, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.Extensions.Logging.EventLogFiltersConfigureOptions |
Microsoft.Extensions.Options.IOptionsChangeTokenSource`1[[Microsoft.Extensions.Logging.LoggerFilterOptions, Microsoft.Extensions.Logging, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.Extensions.Logging.EventLogFiltersConfigureOptionsChangeSource |
Microsoft.Extensions.Options.IPostConfigureOptions`1[[Microsoft.AspNetCore.HostFiltering.HostFilteringOptions, Microsoft.AspNetCore.HostFiltering, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
Microsoft.Extensions.Options.IOptionsChangeTokenSource`1[[Microsoft.AspNetCore.HostFiltering.HostFilteringOptions, Microsoft.AspNetCore.HostFiltering, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
Microsoft.AspNetCore.Hosting.IStartupFilter | Transient | Microsoft.AspNetCore.HostFilteringStartupFilter |
Microsoft.Extensions.DependencyInjection.IServiceProviderFactory`1[[Microsoft.Extensions.DependencyInjection.IServiceCollection, Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
Microsoft.AspNetCore.Hosting.IStartup | Singleton | |
System.Diagnostics.DiagnosticListener | Singleton | |
System.Diagnostics.DiagnosticSource | Singleton | |
Microsoft.AspNetCore.Hosting.IApplicationLifetime | Singleton | Microsoft.AspNetCore.Hosting.Internal.ApplicationLifetime |
Microsoft.Extensions.Hosting.IApplicationLifetime | Singleton | |
Microsoft.AspNetCore.Hosting.Internal.HostedServiceExecutor | Singleton | Microsoft.AspNetCore.Hosting.Internal.HostedServiceExecutor |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Builder.CookiePolicyOptions, Microsoft.AspNetCore.CookiePolicy, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager | Singleton | |
Microsoft.AspNetCore.Routing.IInlineConstraintResolver | Transient | Microsoft.AspNetCore.Routing.DefaultInlineConstraintResolver |
Microsoft.Extensions.ObjectPool.ObjectPool`1[[Microsoft.AspNetCore.Routing.Internal.UriBuildingContext, Microsoft.AspNetCore.Routing, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
Microsoft.AspNetCore.Routing.Tree.TreeRouteBuilder | Transient | |
Microsoft.AspNetCore.Routing.Internal.RoutingMarkerService | Singleton | Microsoft.AspNetCore.Routing.Internal.RoutingMarkerService |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Routing.EndpointOptions, Microsoft.AspNetCore.Routing, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.Extensions.DependencyInjection.ConfigureEndpointOptions |
Microsoft.AspNetCore.Routing.CompositeEndpointDataSource | Singleton | |
Microsoft.AspNetCore.Routing.ParameterPolicyFactory | Singleton | Microsoft.AspNetCore.Routing.DefaultParameterPolicyFactory |
Microsoft.AspNetCore.Routing.Matching.MatcherFactory | Singleton | Microsoft.AspNetCore.Routing.Matching.DfaMatcherFactory |
Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder | Transient | Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder |
Microsoft.AspNetCore.Routing.Internal.DfaGraphWriter | Singleton | Microsoft.AspNetCore.Routing.Internal.DfaGraphWriter |
Microsoft.AspNetCore.Routing.Matching.DataSourceDependentMatcher+Lifetime | Transient | Microsoft.AspNetCore.Routing.Matching.DataSourceDependentMatcher+Lifetime |
Microsoft.AspNetCore.Routing.LinkGenerator | Singleton | Microsoft.AspNetCore.Routing.DefaultLinkGenerator |
Microsoft.AspNetCore.Routing.IEndpointAddressScheme`1[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] | Singleton | Microsoft.AspNetCore.Routing.EndpointNameAddressScheme |
Microsoft.AspNetCore.Routing.IEndpointAddressScheme`1[[Microsoft.AspNetCore.Routing.RouteValuesAddress, Microsoft.AspNetCore.Routing, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Routing.RouteValuesAddressScheme |
Microsoft.AspNetCore.Routing.Matching.EndpointSelector | Singleton | Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector |
Microsoft.AspNetCore.Routing.MatcherPolicy | Singleton | Microsoft.AspNetCore.Routing.Matching.HttpMethodMatcherPolicy |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcOptions, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.MvcCoreMvcOptionsSetup |
Microsoft.Extensions.Options.IPostConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcOptions, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.Infrastructure.MvcOptionsConfigureCompatibilityOptions |
Microsoft.Extensions.Options.IPostConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcOptions, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.MvcCoreMvcOptionsSetup |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.ApiBehaviorOptions, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.Internal.ApiBehaviorOptionsSetup |
Microsoft.Extensions.Options.IPostConfigureOptions`1[[Microsoft.AspNetCore.Mvc.ApiBehaviorOptions, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.Internal.ApiBehaviorOptionsSetup |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Routing.RouteOptions, Microsoft.AspNetCore.Routing, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.Internal.MvcCoreRouteOptionsSetup |
Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelProvider | Transient | Microsoft.AspNetCore.Mvc.Internal.DefaultApplicationModelProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelProvider | Transient | Microsoft.AspNetCore.Mvc.ApplicationModels.ApiBehaviorApplicationModelProvider |
Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider | Transient | Microsoft.AspNetCore.Mvc.Internal.ControllerActionDescriptorProvider |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionSelector | Singleton | Microsoft.AspNetCore.Mvc.Internal.ActionSelector |
Microsoft.AspNetCore.Mvc.Internal.ActionConstraintCache | Singleton | Microsoft.AspNetCore.Mvc.Internal.ActionConstraintCache |
Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintProvider | Transient | Microsoft.AspNetCore.Mvc.Internal.DefaultActionConstraintProvider |
Microsoft.AspNetCore.Routing.MatcherPolicy | Singleton | Microsoft.AspNetCore.Mvc.Routing.ConsumesMatcherPolicy |
Microsoft.AspNetCore.Routing.MatcherPolicy | Singleton | Microsoft.AspNetCore.Mvc.Routing.ActionConstraintMatcherPolicy |
Microsoft.AspNetCore.Mvc.Controllers.IControllerFactory | Singleton | Microsoft.AspNetCore.Mvc.Controllers.DefaultControllerFactory |
Microsoft.AspNetCore.Mvc.Controllers.IControllerActivator | Transient | Microsoft.AspNetCore.Mvc.Controllers.DefaultControllerActivator |
Microsoft.AspNetCore.Mvc.Controllers.IControllerFactoryProvider | Singleton | Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider |
Microsoft.AspNetCore.Mvc.Controllers.IControllerActivatorProvider | Singleton | Microsoft.AspNetCore.Mvc.Controllers.ControllerActivatorProvider |
Microsoft.AspNetCore.Mvc.Internal.IControllerPropertyActivator | Transient | Microsoft.AspNetCore.Mvc.Internal.DefaultControllerPropertyActivator |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionInvokerFactory | Singleton | Microsoft.AspNetCore.Mvc.Internal.ActionInvokerFactory |
Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider | Transient | Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvokerProvider |
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvokerCache | Singleton | Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvokerCache |
Microsoft.AspNetCore.Mvc.Filters.IFilterProvider | Singleton | Microsoft.AspNetCore.Mvc.Internal.DefaultFilterProvider |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultTypeMapper | Singleton | Microsoft.AspNetCore.Mvc.Internal.ActionResultTypeMapper |
Microsoft.AspNetCore.Mvc.Internal.RequestSizeLimitFilter | Transient | Microsoft.AspNetCore.Mvc.Internal.RequestSizeLimitFilter |
Microsoft.AspNetCore.Mvc.Internal.DisableRequestSizeLimitFilter | Transient | Microsoft.AspNetCore.Mvc.Internal.DisableRequestSizeLimitFilter |
Microsoft.AspNetCore.Mvc.Internal.RequestFormLimitsFilter | Transient | Microsoft.AspNetCore.Mvc.Internal.RequestFormLimitsFilter |
Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider | Singleton | Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelMetadataProvider |
Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ICompositeMetadataDetailsProvider | Transient | |
Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderFactory | Singleton | Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory |
Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator | Singleton | |
Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache | Singleton | Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache |
Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder | Singleton | Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder |
Microsoft.AspNetCore.Mvc.Internal.MvcMarkerService | Singleton | Microsoft.AspNetCore.Mvc.Internal.MvcMarkerService |
Microsoft.AspNetCore.Mvc.Internal.ITypeActivatorCache | Singleton | Microsoft.AspNetCore.Mvc.Internal.TypeActivatorCache |
Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory | Singleton | Microsoft.AspNetCore.Mvc.Routing.UrlHelperFactory |
Microsoft.AspNetCore.Mvc.Infrastructure.IHttpRequestStreamReaderFactory | Singleton | Microsoft.AspNetCore.Mvc.Internal.MemoryPoolHttpRequestStreamReaderFactory |
Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory | Singleton | Microsoft.AspNetCore.Mvc.Internal.MemoryPoolHttpResponseStreamWriterFactory |
System.Buffers.ArrayPool`1[[System.Byte, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] | Singleton | |
System.Buffers.ArrayPool`1[[System.Char, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] | Singleton | |
Microsoft.AspNetCore.Mvc.Infrastructure.OutputFormatterSelector | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.DefaultOutputFormatterSelector |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.ObjectResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.PhysicalFileResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.PhysicalFileResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.VirtualFileResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.VirtualFileResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.FileStreamResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.FileStreamResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.FileContentResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.FileContentResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.RedirectResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.RedirectResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.LocalRedirectResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.LocalRedirectResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.RedirectToActionResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.RedirectToActionResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.RedirectToRouteResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.RedirectToRouteResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.RedirectToPageResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.RedirectToPageResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.ContentResult, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IClientErrorFactory | Singleton | Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsClientErrorFactory |
Microsoft.AspNetCore.Mvc.Internal.MvcRouteHandler | Singleton | Microsoft.AspNetCore.Mvc.Internal.MvcRouteHandler |
Microsoft.AspNetCore.Mvc.Internal.MvcAttributeRouteHandler | Transient | Microsoft.AspNetCore.Mvc.Internal.MvcAttributeRouteHandler |
Microsoft.AspNetCore.Routing.EndpointDataSource | Singleton | Microsoft.AspNetCore.Mvc.Internal.MvcEndpointDataSource |
Microsoft.AspNetCore.Mvc.Internal.MvcEndpointInvokerFactory | Singleton | Microsoft.AspNetCore.Mvc.Internal.MvcEndpointInvokerFactory |
Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterConfigurationProvider | Singleton | Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterConfigurationProvider |
Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilder | Singleton | Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilder |
Microsoft.AspNetCore.Hosting.IStartupFilter | Singleton | Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter |
Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionGroupCollectionProvider | Singleton | Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionGroupCollectionProvider |
Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionProvider | Transient | Microsoft.AspNetCore.Mvc.ApiExplorer.DefaultApiDescriptionProvider |
Microsoft.AspNetCore.Authentication.IAuthenticationService | Scoped | Microsoft.AspNetCore.Authentication.AuthenticationService |
Microsoft.AspNetCore.Authentication.IClaimsTransformation | Singleton | Microsoft.AspNetCore.Authentication.NoopClaimsTransformation |
Microsoft.AspNetCore.Authentication.IAuthenticationHandlerProvider | Scoped | Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider |
Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider | Singleton | Microsoft.AspNetCore.Authentication.AuthenticationSchemeProvider |
Microsoft.AspNetCore.Authorization.IAuthorizationService | Transient | Microsoft.AspNetCore.Authorization.DefaultAuthorizationService |
Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider | Transient | Microsoft.AspNetCore.Authorization.DefaultAuthorizationPolicyProvider |
Microsoft.AspNetCore.Authorization.IAuthorizationHandlerProvider | Transient | Microsoft.AspNetCore.Authorization.DefaultAuthorizationHandlerProvider |
Microsoft.AspNetCore.Authorization.IAuthorizationEvaluator | Transient | Microsoft.AspNetCore.Authorization.DefaultAuthorizationEvaluator |
Microsoft.AspNetCore.Authorization.IAuthorizationHandlerContextFactory | Transient | Microsoft.AspNetCore.Authorization.DefaultAuthorizationHandlerContextFactory |
Microsoft.AspNetCore.Authorization.IAuthorizationHandler | Transient | Microsoft.AspNetCore.Authorization.Infrastructure.PassThroughAuthorizationHandler |
Microsoft.AspNetCore.Authorization.Policy.IPolicyEvaluator | Transient | Microsoft.AspNetCore.Authorization.Policy.PolicyEvaluator |
Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelProvider | Transient | Microsoft.AspNetCore.Mvc.Internal.AuthorizationApplicationModelProvider |
Microsoft.AspNetCore.Mvc.Formatters.FormatFilter | Singleton | Microsoft.AspNetCore.Mvc.Formatters.FormatFilter |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcOptions, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.DataAnnotations.Internal.MvcDataAnnotationsMvcOptionsSetup |
Microsoft.AspNetCore.Mvc.DataAnnotations.IValidationAttributeAdapterProvider | Singleton | Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapterProvider |
Microsoft.AspNetCore.DataProtection.Internal.IActivator | Singleton | Microsoft.AspNetCore.DataProtection.TypeForwardingActivator |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.DataProtection.KeyManagement.KeyManagementOptions, Microsoft.AspNetCore.DataProtection, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.DataProtection.Internal.KeyManagementOptionsSetup |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.DataProtection.DataProtectionOptions, Microsoft.AspNetCore.DataProtection, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.DataProtection.Internal.DataProtectionOptionsSetup |
Microsoft.AspNetCore.DataProtection.KeyManagement.IKeyManager | Singleton | Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager |
Microsoft.AspNetCore.DataProtection.Infrastructure.IApplicationDiscriminator | Singleton | Microsoft.AspNetCore.DataProtection.Internal.HostingApplicationDiscriminator |
Microsoft.AspNetCore.Hosting.IStartupFilter | Singleton | Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter |
Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IDefaultKeyResolver | Singleton | Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver |
Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IKeyRingProvider | Singleton | Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider |
Microsoft.AspNetCore.DataProtection.IDataProtectionProvider | Singleton | |
Microsoft.AspNetCore.DataProtection.XmlEncryption.ICertificateResolver | Singleton | Microsoft.AspNetCore.DataProtection.XmlEncryption.CertificateResolver |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions, Microsoft.AspNetCore.Antiforgery, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryOptionsSetup |
Microsoft.AspNetCore.Antiforgery.IAntiforgery | Singleton | Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery |
Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator | Singleton | Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator |
Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenSerializer | Singleton | Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer |
Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenStore | Singleton | Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore |
Microsoft.AspNetCore.Antiforgery.Internal.IClaimUidExtractor | Singleton | Microsoft.AspNetCore.Antiforgery.Internal.DefaultClaimUidExtractor |
Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider | Singleton | Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryAdditionalDataProvider |
Microsoft.Extensions.ObjectPool.ObjectPool`1[[Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext, Microsoft.AspNetCore.Antiforgery, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
System.Text.Encodings.Web.HtmlEncoder | Singleton | |
System.Text.Encodings.Web.JavaScriptEncoder | Singleton | |
System.Text.Encodings.Web.UrlEncoder | Singleton | |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcViewOptions, Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.MvcViewOptionsSetup |
Microsoft.Extensions.Options.IPostConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcViewOptions, Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.ViewFeatures.MvcViewOptionsConfigureCompatibilityOptions |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcOptions, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.TempDataMvcOptionsSetup |
Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine | Singleton | Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.ViewResult, Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.PartialViewResult, Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor |
Microsoft.AspNetCore.Mvc.Internal.IControllerPropertyActivator | Transient | Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionaryControllerPropertyActivator |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | Transient | Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1 | Transient | Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper`1 |
Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator |
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ExpressionTextCache | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ExpressionTextCache |
Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpressionProvider |
Microsoft.AspNetCore.Mvc.ViewFeatures.ValidationHtmlAttributeProvider | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultValidationHtmlAttributeProvider |
Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.JsonHelper |
Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter | Singleton | |
Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentSelector | Singleton | Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentSelector |
Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentFactory | Singleton | Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentFactory |
Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentActivator | Singleton | Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentActivator |
Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProvider | Singleton | Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentDescriptorCollectionProvider |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor`1[[Microsoft.AspNetCore.Mvc.ViewComponentResult, Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.ViewComponentResultExecutor |
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewComponentInvokerCache | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewComponentInvokerCache |
Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorProvider | Transient | Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentDescriptorProvider |
Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvokerFactory | Singleton | Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvokerFactory |
Microsoft.AspNetCore.Mvc.IViewComponentHelper | Transient | Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper |
Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelProvider | Transient | Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataApplicationModelProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelProvider | Transient | Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataAttributeApplicationModelProvider |
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.SaveTempDataFilter | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.SaveTempDataFilter |
Microsoft.AspNetCore.Mvc.ViewFeatures.ControllerSaveTempDataPropertyFilter | Transient | Microsoft.AspNetCore.Mvc.ViewFeatures.ControllerSaveTempDataPropertyFilter |
Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataProvider | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.CookieTempDataProvider |
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ValidateAntiforgeryTokenAuthorizationFilter | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ValidateAntiforgeryTokenAuthorizationFilter |
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.AutoValidateAntiforgeryTokenAuthorizationFilter | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.AutoValidateAntiforgeryTokenAuthorizationFilter |
Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory | Singleton | Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionaryFactory |
System.Buffers.ArrayPool`1[[Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewBufferValue, Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton | |
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.IViewBufferScope | Scoped | Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.MemoryPoolViewBufferScope |
Microsoft.AspNetCore.Mvc.Razor.Internal.CSharpCompiler | Singleton | Microsoft.AspNetCore.Mvc.Razor.Internal.CSharpCompiler |
Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorReferenceManager | Singleton | Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorReferenceManager |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcViewOptions, Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.Razor.Internal.MvcRazorMvcViewOptionsSetup |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions, Microsoft.AspNetCore.Mvc.Razor, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptionsSetup |
Microsoft.Extensions.Options.IPostConfigureOptions`1[[Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions, Microsoft.AspNetCore.Mvc.Razor, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptionsSetup |
Microsoft.AspNetCore.Mvc.Razor.Internal.IRazorViewEngineFileProviderAccessor | Singleton | Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorViewEngineFileProviderAccessor |
Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine | Singleton | |
Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompilerProvider | Singleton | Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompilerProvider |
Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompilationMemoryCacheProvider | Singleton | Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewCompilationMemoryCacheProvider |
Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider | Transient | Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorPageFactoryProvider |
Microsoft.AspNetCore.Mvc.Razor.Internal.LazyMetadataReferenceFeature | Singleton | Microsoft.AspNetCore.Mvc.Razor.Internal.LazyMetadataReferenceFeature |
Microsoft.AspNetCore.Razor.Language.RazorProjectFileSystem | Singleton | Microsoft.AspNetCore.Mvc.Razor.Internal.FileProviderRazorProjectFileSystem |
Microsoft.AspNetCore.Razor.Language.RazorProjectEngine | Singleton | |
Microsoft.AspNetCore.Razor.Language.RazorProject | Singleton | |
Microsoft.AspNetCore.Razor.Language.RazorTemplateEngine | Singleton | Microsoft.AspNetCore.Mvc.Razor.Extensions.MvcRazorTemplateEngine |
Microsoft.AspNetCore.Razor.Language.RazorEngine | Singleton | |
Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator | Singleton | Microsoft.AspNetCore.Mvc.Razor.RazorPageActivator |
Microsoft.AspNetCore.Mvc.Razor.ITagHelperActivator | Singleton | Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultTagHelperActivator |
Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentPropertyActivator | Singleton | Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentPropertyActivator |
Microsoft.AspNetCore.Mvc.Razor.ITagHelperFactory | Singleton | Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultTagHelperFactory |
Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager | Scoped | Microsoft.AspNetCore.Mvc.Razor.Internal.TagHelperComponentManager |
Microsoft.Extensions.Caching.Memory.IMemoryCache | Singleton | Microsoft.Extensions.Caching.Memory.MemoryCache |
Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider | Singleton | Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider |
Microsoft.AspNetCore.Mvc.ViewFeatures.IFileVersionProvider | Singleton | Microsoft.AspNetCore.Mvc.Razor.Infrastructure.DefaultFileVersionProvider |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions, Microsoft.AspNetCore.Mvc.Razor, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.RazorPages.Internal.RazorPagesRazorViewEngineOptionsSetup |
Microsoft.Extensions.Options.IPostConfigureOptions`1[[Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions, Microsoft.AspNetCore.Mvc.RazorPages, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptionsConfigureCompatibilityOptions |
Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionDescriptorProvider |
Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorChangeProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionDescriptorChangeProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Internal.RazorProjectPageRouteModelProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Internal.CompiledPageRouteModelProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelProvider | Singleton | Microsoft.AspNetCore.Mvc.ApplicationModels.DefaultPageApplicationModelProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.AutoValidateAntiforgeryPageApplicationModelProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Internal.AuthorizationPageApplicationModelProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.TempDataFilterPageApplicationModelProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.ViewDataAttributePageApplicationModelProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Internal.ResponseCacheFilterApplicationModelProvider |
Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvokerProvider |
Microsoft.AspNetCore.Mvc.RazorPages.IPageModelActivatorProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageModelActivatorProvider |
Microsoft.AspNetCore.Mvc.RazorPages.IPageModelFactoryProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageModelFactoryProvider |
Microsoft.AspNetCore.Mvc.RazorPages.IPageActivatorProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageActivatorProvider |
Microsoft.AspNetCore.Mvc.RazorPages.IPageFactoryProvider | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageFactoryProvider |
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.IPageLoader | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Internal.DefaultPageLoader |
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.IPageHandlerMethodSelector | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageHandlerMethodSelector |
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageArgumentBinder | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Internal.DefaultPageArgumentBinder |
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageResultExecutor | Singleton | Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageResultExecutor |
Microsoft.AspNetCore.Mvc.RazorPages.PageSaveTempDataPropertyFilter | Transient | Microsoft.AspNetCore.Mvc.RazorPages.PageSaveTempDataPropertyFilter |
Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperStorage | Singleton | Microsoft.AspNetCore.Mvc.TagHelpers.Cache.DistributedCacheTagHelperStorage |
Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperFormatter | Singleton | Microsoft.AspNetCore.Mvc.TagHelpers.Cache.DistributedCacheTagHelperFormatter |
Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperService | Singleton | Microsoft.AspNetCore.Mvc.TagHelpers.Cache.DistributedCacheTagHelperService |
Microsoft.Extensions.Caching.Distributed.IDistributedCache | Singleton | Microsoft.Extensions.Caching.Distributed.MemoryDistributedCache |
Microsoft.AspNetCore.Mvc.TagHelpers.Internal.CacheTagHelperMemoryCacheFactory | Singleton | Microsoft.AspNetCore.Mvc.TagHelpers.Internal.CacheTagHelperMemoryCacheFactory |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcOptions, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.Formatters.Json.Internal.MvcJsonMvcOptionsSetup |
Microsoft.Extensions.Options.IPostConfigureOptions`1[[Microsoft.AspNetCore.Mvc.MvcJsonOptions, Microsoft.AspNetCore.Mvc.Formatters.Json, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Transient | Microsoft.AspNetCore.Mvc.MvcJsonOptionsConfigureCompatibilityOptions |
Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionProvider | Transient | Microsoft.AspNetCore.Mvc.Formatters.Json.JsonPatchOperationsArrayProvider |
Microsoft.AspNetCore.Mvc.Formatters.Json.Internal.JsonResultExecutor | Singleton | Microsoft.AspNetCore.Mvc.Formatters.Json.Internal.JsonResultExecutor |
Microsoft.AspNetCore.Cors.Infrastructure.ICorsService | Transient | Microsoft.AspNetCore.Cors.Infrastructure.CorsService |
Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider | Transient | Microsoft.AspNetCore.Cors.Infrastructure.DefaultCorsPolicyProvider |
Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelProvider | Transient | Microsoft.AspNetCore.Mvc.Cors.Internal.CorsApplicationModelProvider |
Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter | Transient | Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter |
Microsoft.Extensions.Options.IConfigureOptions`1[[Microsoft.AspNetCore.Mvc.Infrastructure.MvcCompatibilityOptions, Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]] | Singleton |
例:使用AspectCoreapp
public class AspectCoreContainer { private static IServiceResolver resolver { get; set; } public static IServiceProvider BuildServiceProvider(IServiceCollection services, Action<IAspectConfiguration> configure = null) { if(services==null)throw new ArgumentNullException(nameof(services)); services.ConfigureDynamicProxy(configure); services.AddAspectCoreContainer(); return resolver = services.ToServiceContainer().Build(); } public static T Resolve<T>() { if (resolver == null) throw new ArgumentNullException(nameof(resolver), "調用此方法時必須先調用BuildServiceProvider!"); return resolver.Resolve<T>(); } public static List<T> ResolveServices<T>() { if (resolver == null) throw new ArgumentNullException(nameof(resolver), "調用此方法時必須先調用BuildServiceProvider!"); return resolver.GetServices<T>().ToList(); } }
調用Resolve拿到實例asp.net
var razorViewEngine = AspectCoreContainer.Resolve<IRazorViewEngine>(); var compositeViewEngine = AspectCoreContainer.Resolve<ICompositeViewEngine>(); var tempDataProvider = AspectCoreContainer.Resolve<ITempDataProvider>(); var serviceProvider = AspectCoreContainer.Resolve<IServiceProvider>(); var options = AspectCoreContainer.Resolve<IOptions>();