Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 public static void V1(this IOpTask task, object value)
 {
     task.GetType().GetField("V1").SetValue(task, value);
 }
Esempio n. 3
0
 public static object V1(this IOpTask task)
 {
     return(task.GetType().GetField("V1").GetValue(task));
 }