All,
I've been searching all over Google for a nice code sample explaining how to
use reflection to get the instance of a method or property and then retrieve
just the IL code for that method or property. The overall goal is to be able
to reverse engineer a given assembly and create a diagram of dependencies.
For instance, let's say that method foo() of class bob makes a call to method
bar() of class sally, I would like to be able to map that "dependency" into a
diagram, but the only way I can think of getting to that point is to be able
to retrieve the IL code for method foo() and examine it in order to determine
that it is calling a method bar() of class sally.
Does anyone have any links to good code samples specific to the following or
code snippets of their own that they are willing to post? Any suggestions
are welcome.
Thanks