internal MonoFunctionType GetFunctionType(string class_name, int token)
{
MonoClassType klass = null;
Cecil.TypeDefinitionCollection types = Assembly.MainModule.Types;
// FIXME: Work around an API problem in Cecil.
foreach (Cecil.TypeDefinition type in types) {
if (type.FullName != class_name)
continue;
klass = LookupMonoClass (type);
break;
}
if (klass == null)
return null;
Cecil.MethodDefinition minfo = MonoDebuggerSupport.GetMethod (
ModuleDefinition, token);
return new MonoFunctionType (klass, minfo);
}