ContainerCollectionRegistratorAppendTService, TImplementation Method (Lifestyle)

Simple Injector
Appends a new registration of TImplementation to existing registrations made for a collection of TService elements using one of the Container.Collections.Register overloads with the given lifestyle.

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

public void Append<TService, TImplementation>(
	Lifestyle lifestyle
)
where TService : class
where TImplementation : class, TService

Parameters

lifestyle
Type: SimpleInjectorLifestyle
The lifestyle that specifies how the returned instance will be cached.

Type Parameters

TService
The element type of the collections to register.
TImplementation
The concrete type that will be appended as registration to the collection.
Exceptions

ExceptionCondition
ArgumentExceptionThrown when the TServiceis ambiguous.
ArgumentNullExceptionThrown when lifestyle is a null reference.
See Also

Reference