Hi,
Just to ask if anyone knows of an open source alternative to RedGate's Reflector? I'm interested in checking out how a tool similar to Reflector actually works.
Thanks, MagicAndi.
Hi,
Just to ask if anyone knows of an open source alternative to RedGate's Reflector? I'm interested in checking out how a tool similar to Reflector actually works.
Thanks, MagicAndi.
Well, Reflector itself is a .NET assembly so you can open Reflector.exe in Reflector to check out how it's built.
The Reflector tool uses Reflection.
You asked for two things - code that shows what reflector does, and also an alternative to reflector.
Here's an example, much simplified from what Reflector does, but it shows the technique of reflection: TypeView.cs
I don't have a suggestion for an open-source Reflector replacement.
Update
Check out the new open source tool, Kaliro, for exploring .Net applications using reflection.
Also, there is a open source disassembler tool:
If anyone has used the tool, I would appreciate it if you would add a comment below letting me know what your thoughts are on the tool.
Actually, I'm pretty sure Reflector is considered a disassembler with some decompiler functionality. Disassembler because it reads the bytes out of an assembly's file and converts it to an assembly language (ILasm in this case). The Decompiler functionality it provides by parsing the IL into well known patterns (like expressions and statements) which then get translated into higher level languages like C#, VB.Net, etc. The addin api for Reflector allows you to write your own language translator if you wish ... however the magic of how it parses the IL into the expression trees is a closely guarded secret.
I would recommend looking at any of the three things mentioned above if you want to understand how IL disassemblers work: Dile, CCI and Mono are all good sources for this stuff.
Some other resources that are valuable are listed on a page I put together a few years ago: http://jasonhaley.com/reversing/
I also highly recommend getting the Ecma 335 spec and Serge Lidin's book too.