ContainerOptionsDefaultLifestyle Property

Simple Injector
Gets or sets the default lifestyle that the container will use when a registration is made when no lifestyle is supplied.

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

public Lifestyle DefaultLifestyle { get; set; }

Property Value

Type: Lifestyle
The default lifestyle.
Exceptions

ExceptionCondition
NullReferenceExceptionThrown when the supplied value is a null reference.
InvalidOperationException Thrown when the container already contains registrations.
See Also

Reference