|
|
@@ -50,7 +50,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- args = new Type[]{typeof(System.String)};
|
|
|
+ args = new Type[]{typeof(System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
|
|
|
if (genericMethods.TryGetValue("ToArray", out lst))
|
|
|
{
|
|
|
foreach(var m in lst)
|
|
|
@@ -64,6 +64,20 @@ namespace ILRuntime.Runtime.Generated
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ args = new Type[]{typeof(System.String)};
|
|
|
+ if (genericMethods.TryGetValue("ToArray", out lst))
|
|
|
+ {
|
|
|
+ foreach(var m in lst)
|
|
|
+ {
|
|
|
+ if(m.GetParameters().Length == 1)
|
|
|
+ {
|
|
|
+ method = m.MakeGenericMethod(args);
|
|
|
+ app.RegisterCLRMethodRedirection(method, ToArray_2);
|
|
|
+
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
|
|
|
if (genericMethods.TryGetValue("First", out lst))
|
|
|
{
|
|
|
@@ -72,7 +86,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
if(m.GetParameters().Length == 1)
|
|
|
{
|
|
|
method = m.MakeGenericMethod(args);
|
|
|
- app.RegisterCLRMethodRedirection(method, First_2);
|
|
|
+ app.RegisterCLRMethodRedirection(method, First_3);
|
|
|
|
|
|
break;
|
|
|
}
|
|
|
@@ -98,6 +112,20 @@ namespace ILRuntime.Runtime.Generated
|
|
|
}
|
|
|
|
|
|
static StackObject* ToArray_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
+ {
|
|
|
+ ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
|
|
|
+ StackObject* ptr_of_this_method;
|
|
|
+ StackObject* __ret = ILIntepreter.Minus(__esp, 1);
|
|
|
+ ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
|
|
|
+ System.Collections.Generic.IEnumerable<System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>> source = (System.Collections.Generic.IEnumerable<System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.IEnumerable<System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
|
|
|
+ __intp.Free(ptr_of_this_method);
|
|
|
+
|
|
|
+ var result_of_this_method = System.Linq.Enumerable.ToArray<System.Action<ILRuntime.Runtime.Intepreter.ILTypeInstance>>(source);
|
|
|
+
|
|
|
+ return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
|
|
|
+ }
|
|
|
+
|
|
|
+ static StackObject* ToArray_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
{
|
|
|
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
|
|
|
StackObject* ptr_of_this_method;
|
|
|
@@ -111,7 +139,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
|
|
|
}
|
|
|
|
|
|
- static StackObject* First_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
+ static StackObject* First_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
{
|
|
|
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
|
|
|
StackObject* ptr_of_this_method;
|