A code transformation and in the future compiler for C# that makes DCI possible in C#. The transformation technique used is based on the work done for both Marvin and maroon and uses Roslyn for the heavy lifting
Instead of trying to analyse that all roles are bound in the same method and only in that method. Enforce that all roles are bound in the constructor (or not at all) by use of the readonly modifier.
A code issue that tests that all readonly fields are set could be applied afterwards
The code meant to compile the source files into dll's doesn't work it's presumed to be a Roslyn issue due to the obscurity of the error message (complaining about an anonymous type not being completed but there's no anonymous types in the code)