Is there any built-in way to use Roslyn to perform the same compile-time transformations that the C# compiler does, e.g. for transforming iterators, initializers, lambdas, LINQ, etc. into basic C# code?
Is there any built-in way to use Roslyn to perform the same compile-time transformations
Share
AFAIK, no, there is no such thing exposed in Roslyn. But the compiler has to do these transformations somehow, so it’s possible you will be able to do this by accessing some
internalmethod.Of course, you could use Roslyn to make these transformations yourself, but that’s not what you’re asking.