Note: This API is now obsolete.
Initializes a new instance of the ScopedLifestyle class.
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 4.10.2
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
Exception | Condition |
---|---|
ArgumentException | Thrown when name is null (Nothing in VB) or an empty string. |
See Also