LifestyleCreateRegistrationTService, TImplementation Method (Container)

Simple Injector

Note: This API is now obsolete.

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

[ObsoleteAttribute("Please use CreateRegistration<TConcrete>(Container) instead. Will be removed in version 5.0.", 
	true)]
[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