Whiteknight/Rosella — Issue #27: Prevent multiple resolution
Author: Whiteknight
Created: 2011-11-21 14:49:53+00:00
State: open
Labels: Container

We need a way to prevent the container from getting into an infinite loop if it attempts to resolve a type which is already attempting to be resolved.

1) Add in a quick registry or build graph which will contain the names of types that are in-process, and throw an error if we attempt to resolve a type while that type is already attempting to be resolved. This only matters for recursive resolutions where the type we are attempting to resolve is in the middle of being resolved higher up the call chain.
2) Add in a Per-Resolve lifetime manager that will allow a single instance to be reused during a single resolve sequence.