Cecil talks 4
A long time I have not blogged. Mainly spent my time working on Cecil. Better than a long talk, here is an example of what Cecil is able to do now. There is a name for programs that write themselves, I’ve forget it, and my example is not really one of them. My example is a very simple C# console program, but it will print its CIL representation, almost like ildasm.
I’ve not included the source and the result on the blog, because they are not really short. The source is viewable here : C# source. We simply load an assembly using Cecil, then we print the content of the methods. Easy no ? Let’s take a look at the output : here.
I have still a lot of work to do, and the API is not really stable, but I’m close to what I want. Once I’ll get it, I think I’ll call for contribution on this blog, to achieve the writing part of Cecil. Stay tuned !
Trackbacks
Use the following link to trackback from your own site:
http://www.evain.net/blog/articles/trackback/11
Excellent. I wish I already had Cecil to weave aspects on top of it in AspectDNG. Jb, no problem to help a bit on writing. Keep the pressure,
Tom
a “quine” is the word you’re looking for
Jb, I’ve talked to you a few times about Mono.Cecil a few times, but I’ve been getting rather paranoid after failed attempts with PERWAPI, RAIL, and other CIL consumption libraries.
Just as a sanity check, will Mono.Cecil allow me to “inject” code into the CIL?
Just checking to make sure =)
By the way, I think your trackback URL might be broken. I posted something and pinged your blog last night; it hasn’t shown up.