SimpleInjectorAddOptionsDisposeContainerWithServiceProvider Property

Simple Injector
Gets or sets the value indicating whether the Container instance ued by the application should be disposed when the framework's IServiceProvider is disposed. The IServiceProvider is typically disposed of on application shutdown, which is also the time to dispose the Container. The default value is true.

Namespace:  SimpleInjector.Integration.ServiceCollection
Assembly:  SimpleInjector.Integration.ServiceCollection (in SimpleInjector.Integration.ServiceCollection.dll) Version: 5.0.0
Syntax

public bool DisposeContainerWithServiceProvider { get; set; }

Property Value

Type: Boolean
A boolean value.
See Also

Reference