AOP with Roslyn

What I am interested in is to make a tool that logs in when the program comes in and out of a method.

It’s good for identifying problems in code and for logging.

What already exists on the market:

PostSharp – one of the best – see https://www.postsharp.net/alternatives
Cecil http://www.mono-project.com/docs/tools+libraries/libraries/Mono.Cecil/
Fody https://github.com/Fody
NConcern: https://github.com/Virtuoze/NConcern
What I do not like is that they are hard to configure. So, instead of writing a configurator, I’m going to write a Roslyn AOP so it’s easy to use POST build event in a CI scenario

I’ve inspired at https://github.com/KeenSoftwareHouse/SpaceEngineers – See https://github.com/KeenSoftwareHouse/SpaceEngineers/tree/master/Sources/VRage.Scripting. Do not compile in VS2017, but you can analyze the code …

The second source of inspiration was http://cezarywalenciuk.pl/blog/programing/post/roslyn-kompilator-net-rewrite-z-csharpsyntaxrewriter – in Polish, but you can see the code … (it gets complicated at the end)

My code will be on https://github.com/ignatandrei/AOP_With_Roslyn