How to get MethodInfo of interface method, having implementing MethodInfo of class method?
OK, I found a way, using GetInterfaceMap.
var map = targetType.GetInterfaceMap(interfaceMethod.DeclaringType);
var index = Array.IndexOf(map.InterfaceMethods, interfaceMethod);
if (index == -1)
{
//this should literally be impossible
}
return map.TargetMethods[index];