SingletonLifestyleCreateRegistration Method (Type, Object, Container)

Simple Injector
Creates a new Registration instance defining the creation of the specified instance. Properties, decorators, interceptors, and initializers may be applied to this instance.

Namespace:  SimpleInjector.Lifestyles
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax

public Registration CreateRegistration(
	Type instanceType,
	Object instance,
	Container container
)

Parameters

instanceType
Type: SystemType
The type of the instance.
instance
Type: SystemObject
The instance to create a registration for.
container
Type: SimpleInjectorContainer
The Container instance for which a Registration must be created.

Return Value

Type: Registration
A new Registration instance.
Exceptions

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

Reference