Beispiel #1
0
        public static object ReadAndRun(string fileName, string type, string method)
        {
            var assbmbly = new AssemblyDefine().Load(fileName);


            foreach (var typeDefinition in assbmbly.TypeDefines)
            {
                if (typeDefinition.TypeDefinition.ShortName == type)
                {
                    var methodefine = typeDefinition.Methods.Find(r => r.MethodDefinition.ShortName == method);
                    if (methodefine != null)
                    {
                        methodefine.Run(null);

#if JS
                        return(methodefine.Clr.ResultPoint);
#else
#endif
                    }
                    break;
                }
            }

            return(null);
        }
Beispiel #2
0
 public static void RegAssembly(TypeDefine.AssemblyDefine assembly)
 {
     Assembly.Add(assembly);
 }