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)); }
public void AddCFunc(string name, CFuncLink link) { FuncLink FuncLink = new FuncLink { Name = name, Link = link, Type = FuncType.CSharp, }; SystemScope.RegisterFunc(FuncLink); }
public void RegFunc(string name, CFuncLink link) { AddCFunc(name, link); }