How can I get a MethodReference to a base class' method by name?
I've tried
type.BaseType.Resolve().Methods;
and if I add the dll containing the base class to the assemblyresolver it returns the methods. But if I add a call using
MSILWorker.Create(OpCodes.Call, baseMethod);
(where baseMethod was found by foreaching Methods from the resolved TypeDefinition) the resulting IL is unreadable, even Reflector freezes and quits.
Now some IL:
if calling private method on type:
call instance void SomeNamespace.MyClass::RaisePropertyChanged(string)
if calling protected method on base type:
call instance void [OtherAssembly]BaseNamespace.BaseClass::RaisePropertyChanged(string)
So, how can I produce the latter using Mono.Cecil?