Prevent multiple resolution #27

Whiteknight opened this Issue Nov 21, 2011 · 0 comments

1 participant


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment