Just to give the completed test code:
// Obj-C
- (MonoObject *)execute
{
// get a reference to the System.Core assembly
MonoAssemblyName *monoAssemblyName =
mono_assembly_name_new(System.Core);
MonoAssembly *monoSystemCoreAssembly =
mono_assembly_loaded(monoAssemblyName);
On 12 Jul 2013, at 21:48, jonat...@mugginsoft.com wrote:
Can I obtain the generic template type from my ObjectSet MonoObject pointer
rather than having to obtain it from a const char*.
I am trying to write a generic routine for calling generic methods.
Perhaps another helper method is the
You must inflate the generic method upon invocation.
IIRC, there is no function in the embedded API which does this.
There is mono_class_inflate_generic_method() but this requires a
MonoGenericContext.
I am attempting to call the generic method ObjectSet.ToList().
The code below employs
Hi,
On 12.07.2013 15:06, jonat...@mugginsoft.com wrote:
// invoke the generic helper method
MonoObject *monoException = NULL;
void *hargs [2];
hargs [0] = methodInfo;
hargs [1] = mono_type_get_object(env.monoDomain, genericParameterType);
MonoMethod *genericMethod
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:
On 12.07.2013 21:43, jonat...@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);
Hi
On 12.07.2013 22:25, Robert Jordan wrote:
To me, it looks like you want to inflate invoke to ToList
on ObjectSetData.Employee which doesn't sound quite right to me.
I'm rephrasing this :)
It looks like you're inflating ToList with ObjectSetData.Employee
instead of Data.Employee.
Hi
I have a MonoAssembly pointer to System.Core.
I obtain a MonoClass pointer to System.Linq.Enumerable with the above
assembly.
This is a static class used to implement LINQ functionality via extensions.
I write the method names to the console.
The signature of the the method I want, ToList() is
On 11.07.2013 13:55, mugginsoft wrote:
Hi
I have a MonoAssembly pointer to System.Core.
I obtain a MonoClass pointer to System.Linq.Enumerable with the above
assembly.
This is a static class used to implement LINQ functionality via extensions.
I write the method names to the console.
The
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
On 11.07.2013 15:31, mugginsoft wrote:
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 the method
const char *methodName =
Robert Jordan wrote
This must be
:ToList(System.Collections.Generic.IEnumerable`1)
Hmm. This still aborts with me.
My setup is OS X 10.8.4 running 32bit Mono 3.0.10 and the v4.0.30319
runtime.
Jonathan
--
View this message in context:
On 11.07.2013 15:53, mugginsoft wrote:
Robert Jordan wrote
This must be
:ToList(System.Collections.Generic.IEnumerable`1)
Hmm. This still aborts with me.
Now I see why: you're using mono_class_get_method_from_name ()
and this function expects nothing more than the simple method name.
Try
Robert Jordan wrote
Try mono_class_get_method_from_name (ToList, 1) or create
a descriptor from :ToList(System.Collections.Generic.IEnumerable`1).
Thanks.
mono_class_get_method_from_name (ToList, 1) does resolve.
However:
My actual implementation is via Dumbarton which uses
Robert Jordan wrote
Oops, my test actually passes with:
:ToList(System.Collections.Generic.IEnumerable`1
TSource
)
Thanks. I thought I had tried all the combinations - I should have been more
methodical! I wonder why the method name querying functions provide a
different sig?
However
On 11.07.2013 21:08, mugginsoft wrote:
Robert Jordan wrote
Oops, my test actually passes with:
:ToList(System.Collections.Generic.IEnumerable`1
TSource
)
Thanks. I thought I had tried all the combinations - I should have been more
methodical! I wonder why the method name querying
16 matches
Mail list logo