|I'm not sure there is an easy way to do that, but that doesn't mean it's impossible. Here is one way to go about it.
You'll need to create a post-build event to call your code that inspects the assembly.
The code to inspect the assembly will first have to load up the just-built assembly. You can then get a list of all the types in that assembly (see here).
Next, you'll need to inspect the methods on each of those types:
public void InspectMethod(MethodInfo mi)
var body = mi.GetMethodBody();
var ilBytes = body.GetILAsByteArray();
The only way I can see to check calls to your method would be to manually inspect the IL. That's the part that I don't think will be easy, but it should be doable. You can read about that here: "Parsing the IL of a Method Body".
This sounds like a big pain in the rear, and I can think of very few scenarios where this would be necessary or even useful. Perhaps if you let us know what you're trying to accomplish by doing this, we could suggest another way.
|But who's fixing the fixign?|