SimpleInjectorAspNetCoreMvcIntegrationExtensionsRegisterMvcViewComponents Method (Container, IViewComponentDescriptorProvider)

Simple Injector

Note: This API is now obsolete.

Registers the ASP.NET view component types using the supplied viewComponentDescriptorProvider.

Namespace:  SimpleInjector
Assembly:  SimpleInjector.Integration.AspNetCore.Mvc.Core (in SimpleInjector.Integration.AspNetCore.Mvc.Core.dll) Version: 4.10.3
Syntax

[ObsoleteAttribute("Please use SimpleInjectorAspNetCoreBuilderMvcCoreExtensions.AddViewComponentActivation instead—e.g. 'services.AddSimpleInjector(container, options => options.AddAspNetCore().AddViewComponentActivation());'. Please see https://simpleinjector.org/aspnetcore for more details. Will be removed in version 5.0.", 
	true)]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public static void RegisterMvcViewComponents(
	this Container container,
	IViewComponentDescriptorProvider viewComponentDescriptorProvider
)

Parameters

container
Type: SimpleInjectorContainer
The container the controllers should be registered in.
viewComponentDescriptorProvider
Type: IViewComponentDescriptorProvider
The provider that contains the list of view components to register.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Container. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference