ScopedLifestyle Constructor (String, Boolean)

Simple Injector

Note: This API is now obsolete.

Initializes a new instance of the ScopedLifestyle class.

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

[ObsoleteAttribute("This constructor overload is deprecated. The disposal of instances can't be suppressed anymore", 
	true)]
protected ScopedLifestyle(
	string name,
	bool disposeInstances
)

Parameters

name
Type: SystemString
The user friendly name of this lifestyle.
disposeInstances
Type: SystemBoolean
Signals the lifestyle whether instances should be disposed or not.
Exceptions

ExceptionCondition
ArgumentExceptionThrown when name is null (Nothing in VB) or an empty string.
See Also

Reference