Open benjamin-bader opened 11 years ago
This needs some deep thought. The API would be so much more usable, but only if codegen actually works beyond the 80% case. For example, how to support this;
public T Get<T>()
{
return this.Container.Get<T>();
}
Naively, we could just search the whole world for calls to Get, and look at their generic arguments. And what if those arguments are themselves generic? How deeply should we look?
Pros:
Injects = new[] { typeof(Foo) }
boilerplateCons:
Container.Add
complicates thisbase.OnCreate { Container.Add(GetModules()).Inject(this, GetType()); }
seems hard to analyze reliably