public void MethodCompile(IOpTask r) { var parse = TypeParse.Parse(r.OpCode); var find = Methods.Find(rx => rx.MethodDefinition.CallName == parse.CallName); //本地查找 if (find == null && parse.TypeDefine != null) { find = parse.TypeDefine.Methods.Find(rx => rx.MethodDefinition.CallName == parse.CallName); if (find == null) { throw new NotSupportedException(); } } if (find != null) { r.Method = find; r.GetType().GetField("V3").SetValue(r, find); } else { //try clr cross var method = Cross.CrossDomain.Build(parse.CallName); r.Method = method; r.GetType().GetField("V3").SetValue(r, method); } }
public static void V1(this IOpTask task, object value) { task.GetType().GetField("V1").SetValue(task, value); }
public static object V1(this IOpTask task) { return(task.GetType().GetField("V1").GetValue(task)); }