AArnott / CodeGeneration.Roslyn

Assists in performing Roslyn-based code generation during a build.
Microsoft Public License
408 stars 59 forks source link

Replacing method at compilation-time #47

Closed CarefreeCloud closed 7 years ago

CarefreeCloud commented 7 years ago

Maybe I got it all wrong, but is it even possible to exclude attribute consumer MemberDeclarationSyntaxs from compilation? So if I have a code generation-consumer method, I still have it with same identifier, but slightly changed at buildtime

AArnott commented 7 years ago

No. Code generation is limited to adding members/types, not replacing existing ones. That's something of a fundamental limitation of the overall system for several reasons -- not so much a limitation of this project.

orellabac commented 6 years ago

@AArnott Why is it considered a limitation of the overall system? I have been working a weaver tool based on this same approach and it works for me. I made some slight changes but in general borrows all the same concepts that you have here