private static string GenInterfaceForward2(string a, object b, IGenInterface <string, object> igen) { IL.Push(igen); IL.Push(new S32()); IL.Push(a); IL.Push(b); IL.Emit.Tail(); IL.Emit.Callvirt(new MethodRef(typeof(IGenInterface <string, object>), nameof(IGenInterface <string, object> .G))); return(IL.Return <string>()); }
private static string GenInterfaceForwardG <T1, T2>(T1 a, T2 b, IGenInterface <T1, T2> igen) { IL.Push(igen); IL.Push(new S32()); IL.Push(a); IL.Push(b); IL.Emit.Tail(); IL.Emit.Callvirt(new MethodRef(typeof(IGenInterface <T1, T2>), nameof(IGenInterface <T1, T2> .G))); return(IL.Return <string>()); }
public static IGenInterface <U> CallInterface <U, V>(IGenInterface <U> x, V v) { return(x.InterfaceMethod2(v)); }
public static string CallInterface(IGenInterface <T> x) { return(x.InterfaceMethod1()); }
private static string GenInterfaceForwardNone(string a, object b, int c, object d, IGenInterface <string, object> igen) { IL.Push(igen); IL.Push(new S32()); IL.Push(a); IL.Push(b); IL.Push(c); IL.Push(d); IL.Emit.Tail(); IL.Emit.Callvirt(new MethodRef(typeof(IGenInterface <string, object>), nameof(IGenInterface <string, object> .F)).MakeGenericMethod(typeof(int), typeof(object))); return(IL.Return <string>()); }
private static string GenInterfaceForwardF <T1, T2, T3, T4>(T1 a, T2 b, T3 c, T4 d, IGenInterface <T1, T2> igen) { IL.Push(igen); IL.Push(new S32()); IL.Push(a); IL.Push(b); IL.Push(c); IL.Push(d); IL.Emit.Tail(); IL.Emit.Callvirt(new MethodRef(typeof(IGenInterface <T1, T2>), nameof(IGenInterface <T1, T2> .F)).MakeGenericMethod(typeof(T3), typeof(T4))); return(IL.Return <string>()); }