RegistrationBuildTransientDelegateTService Method (FuncTService)

Simple Injector
Builds a FuncTResult delegate for the creation of the TService using the supplied instanceCreator. The returned FuncTResult might be intercepted by a Container.ExpressionBuilding event, and the instanceCreator will have been wrapped with a delegate that executes the registered initializers that are applicable to the given TService (if any).

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

protected Func<TService> BuildTransientDelegate<TService>(
	Func<TService> instanceCreator
)
where TService : class

Parameters

instanceCreator
Type: SystemFuncTService
The delegate supplied by the user that allows building or creating new instances.

Type Parameters

TService
The interface or base type that can be used to retrieve instances.

Return Value

Type: FuncTService
A FuncTResult delegate.
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown when one of the arguments is a null reference.
See Also

Reference