Esempio n. 1
0
        private static void Main(string [] args)
        {
            ScriptSource   src  = new ScriptSource("test1.vs");
            Compiler       comp = new Compiler();
            CompiledSource s    = comp.Compile(src);



            ManagedHost test_vme = new ManagedHost();

            test_vme.AddModule(new Module(s.EntryPoint));



            System.Console.WriteLine("R:" + test_vme.ExecuteStaticFunc("test"));



            while (true)
            {
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            ScriptSource   src  = new ScriptSource("Foom/main.fs");
            Compiler       comp = new Compiler();
            CompiledSource s    = comp.Compile(src);



            ManagedHost test_vme = new ManagedHost();

            test_vme.AddModule(new Module(s.EntryPoint));

            InvaderAPP Foom = null;

            dynamic F_InitFoom(dynamic[] pars)
            {
                Console.WriteLine("Foom booting up.");

                Foom = new InvaderAPP();

                return(null);
            }

            var InitFoom = new CFuncLink
            {
                Link = F_InitFoom,
                Name = "InitFoom"
            };

            test_vme.RegFunc("InitFoom", InitFoom);


            System.Console.WriteLine("R:" + test_vme.ExecuteStaticFunc("Entry"));

            while (true)
            {
            }
        }