ASP.NET Core中的依赖注入可以说是无处不在,其通过创建一个ServiceCollection对象并将服务注册信息以ServiceDescriptor对象的形式添加在其中,其次针对ServiceCollection对象创建对应的ServiceProvider,通过ServiceProvider提供我们需要的服务实例。
这里通过IServiceCollection来查看一下 其默认注册了哪些服务。
- 1、使用asp.net core mvc默认模板,命令行创建项目
dotnet new mvc -o projectname
Microsoft.Extensions.DependencyInjection中提供很多IServiceCollection的扩展方法来添加服务注册。如:
/// <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);
}
- 2、在Startup.cs中 将IServiceCollection中注册的服务输出到日志
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 |
- 3、我们能够直接获取这些服务的实例来使用,也可以使用第三方容器如:AspectCore、Autofac
例:使用AspectCore
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拿到实例
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>();
ASP.NET Core MVC内置服务的使用的更多相关文章
-
ASP.NET Core 中文文档 第二章 指南(2)用 Visual Studio 和 ASP.NET Core MVC 创建首个 Web API
原文:Building Your First Web API with ASP.NET Core MVC and Visual Studio 作者:Mike Wasson 和 Rick Anderso ...
-
【翻译】在Visual Studio中使用Asp.Net Core MVC创建你的第一个Web API应用(一)
HTTP is not just for serving up web pages. It's also a powerful platform for building APIs that expo ...
-
[转]【翻译】在Visual Studio中使用Asp.Net Core MVC创建你的第一个Web API应用(一)
本文转自:https://www.cnblogs.com/inday/p/6288707.html HTTP is not just for serving up web pages. It’s al ...
-
Asp.Net Core MVC框架内置过滤器
第一部分.MVC框架内置过滤器 下图展示了Asp.Net Core MVC框架默认实现的过滤器的执行顺序: Authorization Filters:身份验证过滤器,处在整个过滤器通道的最顶层.对应 ...
-
[.Net Core] 简单使用 Mvc 内置的 Ioc(续)
简单使用 Mvc 内置的 Ioc(续) 本文基于 .NET Core 2.0. 上一章<[.Net Core] 简单使用 Mvc 内置的 Ioc>已经对日常 Mvc 中的 Ioc 的简单用 ...
-
ASP.NET Core MVC 2.x 全面教程_ASP.NET Core MVC 03. 服务注册和管道
ASP.NET Core MVC 2.x 全面教程_ASP.NET Core MVC 03. 服务注册和管道 语雀: https://www.yuque.com/yuejiangliu/dotnet/ ...
-
[.Net Core] 简单使用 Mvc 内置的 Ioc
简单使用 Mvc 内置的 Ioc 本文基于 .NET Core 2.0. 鉴于网上的文章理论较多,鄙人不才,想整理一份 Hello World(Demo)版的文章. 目录 场景一:简单类的使用 场景二 ...
-
ASP.NET Core 中文文档 第四章 MVC(01)ASP.NET Core MVC 概览
原文:Overview of ASP.NET Core MVC 作者:Steve Smith 翻译:张海龙(jiechen) 校对:高嵩 ASP.NET Core MVC 是使用模型-视图-控制器(M ...
-
ASP.NET Core MVC之Serilog日志处理,你了解多少?
前言 本节我们来看看ASP.NET Core MVC中比较常用的功能,对于导入和导出目前仍在探索中,项目需要自定义列合并,所以事先探索了如何在ASP.NET Core MVC进行导入.导出,更高级的内 ...
随机推荐
-
JavaWeb_day04搜索_乱码_路径_转发重定向_cookie
本文为博主辛苦总结,希望自己以后返回来看的时候理解更深刻,也希望可以起到帮助初学者的作用. 转载请注明 出自 : luogg的博客园 谢谢配合! 搜索功能 DAO层都是一些数据库的增删改查操作 Ser ...
-
多预览小图焦点轮播插件lrtk
多预览小图焦点轮播插件lrtk // JavaScript Document $(document).ready(function(){ //$('#select_btn li:first').css ...
-
acdream1233 Royal Federation (构造?)
http://acdream.info/problem?pid=1233 Andrew Stankevich's Contest (3) ASC 3 Royal Federation Special ...
-
TortoiseGit GitHub 使用指南
TortoiseGit GitHub 使用指南 这个文档讲的还是比较清楚和完整的.需要注意的一点是ssh的方式,取gitHub的URL的时候选取ssh方式. http://www.360doc.co ...
-
接口是干爹, 继承是亲爹 ---JAVA
接口(interface)是干爹, 因为你可以有很多很多的干爹爹... 继承(extends)是亲爹, 因为你只能有一个父类, 只有一个亲生的父亲. 单继承,多接口?./>./..
-
C#常用单元测试框架比较:XUnit, NUnit, 和 Visual Studio(MSTest)
做过单元测试的同学大概都知道以上几种测试框架,但我一直很好奇它们到底有什么不同,然后搜到了一篇不错的文章清楚地解释了这几种框架的最大不同之处. 地址在这里:http://www.tuicool.com ...
-
index_init_oprions.go
{ options.DocCacheSize = defaultDocCacheSize } }
-
LogUtil【实现*的控制日志的打印的封装类】
版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 主要用于控制项目开发和上线阶段日志的打印. 效果图 暂不需要. 代码分析 在LogUtil类中声明代表不同日志级别的常量值(VERB ...
-
使用MUI/html5plus集成微信支付需要注意的几点问题
1)需要在服务器根目录放上证书,从微信开放平台下载 2)客户端组件目录名一定要按照微信要求
-
mongodb副本集用户权限设置
mongodb副本集用户权限设置 用户权限参考文章 一:先看看MongoDB中用户的角色说明 read : 数据库的只读权限,包括: aggregate,checkShardingIndex, ...