stronginject icon indicating copy to clipboard operation
stronginject copied to clipboard

StrongInject Source Generator API

Open ettud opened this issue 2 years ago • 1 comments

What do you think about exposing SourceGenerator and IncrementalGenerator though the separate package? E. g. if I wanted to write another source generator that writes [Register(typeof(SomeController), Scope.InstancePerResolution)] and IContainer<SomeController> for each controller in the project, it wouldn't work since source generators run separately. However, if there were some API, I could call StrongInject source generator from my source generator the same way you do it in the tests in the TestBase.cs.

ettud avatar May 20 '22 18:05 ettud

Hi @ettud what exactly would you like this API to look like? Do you just want the generators to be public?

My recommendation is to fork StrongInject and to get something that works. Then if it seems broadly useful I'd be happy to take the changes upstream.

YairHalberstadt avatar May 22 '22 17:05 YairHalberstadt