LifestyleCreateRegistrationTService, TImplementation Method (Container)

Simple Injector

Note: This API is now obsolete.

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

[ObsoleteAttribute("This overload has been deprecated. Please call CreateRegistration<TConcrete>(Container) instead.", 
	false)]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public Registration CreateRegistration<TService, TImplementation>(
	Container container
)
where TService : class
where TImplementation : class, TService

Parameters

container
Type: SimpleInjectorContainer
The Container instance for which a Registration must be created.

Type Parameters

TService
The interface or base type that can be used to retrieve the instances.
TImplementation
The concrete type that will be created.

Return Value

Type: Registration
A new Registration instance.
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown when container is a null reference (Nothing in VB).
See Also

Reference