Closed sonofaforester closed 7 years ago
Another beta would be great. The other problem I'm running into currently is that with ninject, we were able to inject the factory interface into objects created by the factory. With Grace, I'm getting a Recursive object graph exception. I'm wondering if the factory's lifetime should be Singleton to solve this?
@sonofaforester Grace usually doesn't allow recursive calls like that (outside of using Lazy<T>
). That said because there is a special DynamicFactoryStrategy it will be easy to support.
I'm going to update the code to put the newly created factory instance into the IInjectionContext, then later when the factory is needed as a dependency to it's children it will be fetched from the context rather than trying to instantiate a new one.
I'll make the changes later today or tomorrow and do a beta release.
Good catch, sorry about that. I'll merge this in tonight. Do you want another beta?