AdvancedExtensionsIsLocked Method

Simple Injector
Determines whether the specified container is locked making any new registrations. The container is automatically locked when GetInstance is called for the first time.

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

public static bool IsLocked(
	this Container container
)

Parameters

container
Type: SimpleInjectorContainer
The container.

Return Value

Type: Boolean
true if the specified container is locked; otherwise, false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Container. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown when container is null.
See Also

Reference