-
Notifications
You must be signed in to change notification settings - Fork 525
Description
Ninject Version : Current Release (Version 3.2)
In sample application below, we want to verify that multiple call to Get give the same result : throw Activation Exception - because we did not bind any IWeapon object - .
The first call is OK, exception is raised (visualized in Text Visualizer) :
Unfortunnately, the second call does not throw exception and return an instance of Samurai.
This is not what we expect.
We check that Context class uses Cache for Resolution :
- that stores an instance, created during the first call of Get (cache.Remember(this, reference)
(Cache is not cleared, even if ActivationException occurs after) - that returns this instance during second call :
This behavior is strange (same method Get called twice gives different result), but maybe we are wrong in our expected result ? Or Maybe we have to modify Ninject Setting ? (We turned ActivationCacheDisabled to True, but no impact)

Note : same behavior in pending V4 version.
Someone could help ?
Thanks.


