MvcViewFeaturesMvcBuilderExtensions Class¶
Extensions methods for configuring MVC via an Microsoft.Extensions.DependencyInjection.IMvcBuilder.
- Namespace
Microsoft.Extensions.DependencyInjection- Assemblies
- Microsoft.AspNetCore.Mvc.ViewFeatures
Syntax¶
public class MvcViewFeaturesMvcBuilderExtensions
-
class
Microsoft.Extensions.DependencyInjection.MvcViewFeaturesMvcBuilderExtensions
Methods¶
-
AddViewComponentsAsServices(Microsoft.Extensions.DependencyInjection.IMvcBuilder)¶ Registers discovered view components as services in the
Microsoft.Extensions.DependencyInjection.IServiceCollection.Arguments: builder (Microsoft.Extensions.DependencyInjection.IMvcBuilder) – The Microsoft.Extensions.DependencyInjection.IMvcBuilder.Return type: Microsoft.Extensions.DependencyInjection.IMvcBuilder Returns: The Microsoft.Extensions.DependencyInjection.IMvcBuilder.public static IMvcBuilder AddViewComponentsAsServices(this IMvcBuilder builder)
-
AddViewOptions(Microsoft.Extensions.DependencyInjection.IMvcBuilder, System.Action<Microsoft.AspNetCore.Mvc.MvcViewOptions>)¶ Adds configuration of
Microsoft.AspNetCore.Mvc.MvcViewOptionsfor the application.Arguments: - builder (Microsoft.Extensions.DependencyInjection.IMvcBuilder) – The
Microsoft.Extensions.DependencyInjection.IMvcBuilder. - setupAction (System.Action<Microsoft.AspNetCore.Mvc.MvcViewOptions>) – The
Microsoft.AspNetCore.Mvc.MvcViewOptionswhich need to be configured.
Return type: Returns: public static IMvcBuilder AddViewOptions(this IMvcBuilder builder, Action<MvcViewOptions> setupAction)
- builder (Microsoft.Extensions.DependencyInjection.IMvcBuilder) – The
-