Using Roslyn, I would like to modify my C# code before the actual compilation. For now, I will just need something like:
[MyAnotatedMethod]
public void MyMethod(
It is a little more dirty than using an Annotation, but blocking code out using Preprocessor Directives will allow you to configure how your code compiles based on flags.
http://www.codeproject.com/Articles/304175/Preprocessor-Directives-in-Csharp
Code in the #ifMyFlag in the below will only be compiled if MyFlag is defined
#define MyFlag
public void MyMethod()
{
#if MyFlag
// Flag conditional code
#endif
// method-body
}