[Mono-list] Embedded API: Method signature not found with generic parameter
mugginsoft
jonathan at mugginsoft.com
Thu Jul 11 13:31:05 UTC 2013
Robert Jordan wrote
> It works for me using both mono_class_get_method_from_name ()
> and mono_method_desc_search_in_class ().
I am still having issues:
// get a reference to the System.Core assembly
MonoAssemblyName *monoAssemblyName =
mono_assembly_name_new("System.Core");
MonoAssembly *monoSystemCoreAssembly =
mono_assembly_loaded(monoAssemblyName);
mono_assembly_name_free(monoAssemblyName);
// get class System.Linq.Enumerable
MonoType *monoType =
mono_reflection_type_from_name("System.Linq.Enumerable", (MonoImage
*)mono_assembly_get_image(monoSystemCoreAssembly));
MonoClass *monoClass = mono_class_from_mono_type(monoType);
if (!monoClass) abort; // passes
const char *className = mono_class_get_name(monoClass); // looks kosher
// get the method
const char *methodName =
":ToList<TSource>(System.Collections.Generic.IEnumerable`1)";
MonoMethod *method = mono_class_get_method_from_name(monoClass,
methodName, 1);
if (!method) {
abort(); // fails
}
Jonathan
--
View this message in context: http://mono.1490590.n4.nabble.com/Embedded-API-Method-signature-not-found-with-generic-parameter-tp4660157p4660159.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list