There are no marshaling related things in IL. Instead, you should analyze the types of method parameters (with modifiers) and the types of data returned, following the rules described in MSDN . These rules are quite simple, it should be possible to write an automatic check and connect it, for example. FxCop.
source
share