SimpleInjectorAspNetCoreMvcIntegrationExtensionsAddSimpleInjectorTagHelperActivation Method

Simple Injector
Registers a custom SimpleInjectorTagHelperActivator that allows the resolval of tag helpers using the container. In case no applicationTypeSelector is supplied, the custom tag helper activator will forward the creation of tag helpers that are not located in a "Microsoft*" namespace to Simple Injector.

Namespace:  SimpleInjector
Assembly:  SimpleInjector.Integration.AspNetCore.Mvc (in SimpleInjector.Integration.AspNetCore.Mvc.dll) Version: 4.1.0-alpha1

public static void AddSimpleInjectorTagHelperActivation(
	this IServiceCollection services,
	Container container,
	Predicate<Type> applicationTypeSelector = null


Type: IServiceCollection
The IServiceCollection the custom tag helper activator should be registered in.
Type: SimpleInjectorContainer
The container tag helpers should be resolved from.
applicationTypeSelector (Optional)
Type: SystemPredicateType
An optional predicate that allows specifying which types should be resolved by Simple Injector (true) and which should be resolved by the framework (false). When not specified, all tag helpers whose namespace does not start with "Microsoft" will be forwarded to the Simple Injector container.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IServiceCollection. 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