To answer this, the nice thing with Roslyn that is not explain in this blog is that it's also an API that you can extend with plugins. You project can contains them and they will have access to the AST at compile time, altering the compiled logic.
So in your example you could create one to detect your attribute and inject custom logic instead. You can unleash the full power of AOP at the compilation level.
So in your example you could create one to detect your attribute and inject custom logic instead. You can unleash the full power of AOP at the compilation level.