MvcViewFeaturesMvcBuilderExtensions.AddViewComponentsAsServices 方法

定义

将发现的视图组件注册为 中的 IServiceCollection服务。

public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewComponentsAsServices (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder);
static member AddViewComponentsAsServices : Microsoft.Extensions.DependencyInjection.IMvcBuilder -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddViewComponentsAsServices (builder As IMvcBuilder) As IMvcBuilder

参数

返回

IMvcBuilder

适用于