private static void WrapMethod(IClass t, IOperand wrapped, MethodInfo mi) { var method = t.Method(mi).Public; using (var code = method.Code()) { code.Return(wrapped.Invoke(mi, method.Args.AsOperands())); } }