ContainerOptionsDefaultScopedLifestyle Property

Simple Injector
Gets or sets the default scoped lifestyle that the container should use when a registration is made using Lifestyle.Scoped.

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

public ScopedLifestyle DefaultScopedLifestyle { get; set; }

Property Value

Type: ScopedLifestyle
The default scoped lifestyle.
Exceptions

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

Reference