ContainerCollectionRegistratorAppendTo Method (Type, Type)

Simple Injector

Note: This API is now obsolete.

Allows appending new registrations to existing registrations made using one of the Collections.Register overloads.

Namespace:  SimpleInjector
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 4.4.0
Syntax

[ObsoleteAttribute("Please use Container.Collection.Append instead.", 
	false)]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public void AppendTo(
	Type serviceType,
	Type implementationType
)

Parameters

serviceType
Type: SystemType
The service type of the collection.
implementationType
Type: SystemType
The implementation type to append.
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown when one of the supplied arguments is a null reference (Nothing in VB).
ArgumentExceptionThrown when the serviceType is not a reference type, or ambiguous.
InvalidOperationExceptionThrown when the container is locked.
NotSupportedExceptionThrown when the method is called for a registration that is made with one of the Collections.Register overloads that accepts a dynamic collection (an IEnumerable or IEnumerable<TService>).
See Also

Reference