AspNetRequestLifestyle Constructor (Boolean)

Simple Injector

Note: This API is now obsolete.

Initializes a new instance of the AspNetRequestLifestyle class.

Namespace:  SimpleInjector.Integration.AspNetCore
Assembly:  SimpleInjector.Integration.AspNetCore (in SimpleInjector.Integration.AspNetCore.dll) Version: 4.1.0-alpha1
Syntax

[ObsoleteAttribute("This constructor overload has been deprecated. Please use ExecutionContextScopeLifestyle() instead.", 
	true)]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public AspNetRequestLifestyle(
	bool disposeInstanceWhenScopeEnds
)

Parameters

disposeInstanceWhenScopeEnds
Type: SystemBoolean
Specifies whether the created and cached instance will be disposed when the Web API request ends, and when the created object implements IDisposable.
See Also

Reference