jbevain/cecil — pull request #165 by alexrp (2014-04-16 10:36:31+00:00)
Title: Allow raw instructions when constructing modules.

This is an initial proposal to allow emitting arbitrary stuff into method bodies. It currently doesn't support doing so when loading modules as I'm not sure what the right thing to do is in that case.

The idea here is that a raw instructions is just a bunch of bytes and, optionally, an operand that is encoded after those bytes. This should cater to all use cases, I think. The optional operand is there so that users don't have to worry about the low-level details of encoding metadata tokens (which is significant for strings in particular, as there's no API for that).

Note that I haven't tested these changes because I can't seem to get the test suite running on Linux.