Beispiel #1
0
        public void RegisterOSFuncs( )
        {
            // - Millisecs()

            CFuncLink millisecs = new CFuncLink
            {
                Link = (t) =>
                {
                    return((dynamic)Environment.TickCount);
                }
            };

            // - printF( <Expressions> )

            CFuncLink printF = new CFuncLink
            {
                Link = (t) =>
                {
                    Console.WriteLine("printF:" + t[0]);

                    return(null);
                }
            };

            AddCFunc("printf", printF);

            AddClass(typeof(TestClass));
        }
Beispiel #2
0
        public void AddCFunc(string name, CFuncLink link)
        {
            FuncLink FuncLink = new FuncLink
            {
                Name = name,
                Link = link,
                Type = FuncType.CSharp,
            };

            SystemScope.RegisterFunc(FuncLink);
        }
Beispiel #3
0
 public void RegFunc(string name, CFuncLink link)
 {
     AddCFunc(name, link);
 }