[Mono-list] Embedded API: Method signature not found with generic parameter
Robert Jordan
robertj at gmx.net
Fri Jul 12 20:25:01 UTC 2013
On 12.07.2013 21:43, jonathan at mugginsoft.com wrote:
>> You have to unbox the result of mono_runtime_invoke because it
>> returns the IntPtr boxed in a MonoObject*.
>>
>> Something like that:
>>
>> MonoObject* obj = mono_runtime_invoke (...)
>> MonoMethod* genericMethod = *(MonoMethod**) mono_object_unbox (obj);
>>
>
> The above makes sense but it aborts with:
>
> System.Data.Entity.Core.Objects.ObjectSet<Data.Employee> doesn't implement interface System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Objects.ObjectSet<Data.Employee>>
>
> mono_class_get_interfaces(ObjectSet) says:
>
> Interface name: IObjectSet`1
> Interface name: IQueryable`1
> Interface name: IEnumerable`1
> Interface name: IQueryable
> Interface name: IEnumerable
According to MSDN, ObjectSet<Data.Employee> is implementing
IEnumerable<Data.Employee>. So your "genericParameter", when
inflating ToList, must be Data.Employee.
To me, it looks like you want to inflate & invoke to ToList
on ObjectSet<Data.Employee> which doesn't sound quite right to me.
But I'm missing context to be able to answer this. Do you have a C#
scribble of what you're trying to achieve?
Robert
More information about the Mono-list
mailing list