ScopeSetItem Method

Simple Injector
Stores an item by the given key in the scope.

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

public void SetItem(
	Object key,
	Object item
)

Parameters

key
Type: SystemObject
The key of the item to insert or override.
item
Type: SystemObject
The actual item. May be null.
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown when paramref name="key"/> is a null reference (Nothing in VB).
Remarks

Thread-safety: Calls to this method are thread-safe, but users should take proper percussions when they call both GetItem(Object) and SetItem.
See Also

Reference