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: RegistrationA new Registration instance.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when on of the supplied arguments is a null reference. |
See Also