本文整理汇总了C#中Wren.Core.VM.WrenVM.Primitive方法的典型用法代码示例。如果您正苦于以下问题:C# WrenVM.Primitive方法的具体用法?C# WrenVM.Primitive怎么用?C# WrenVM.Primitive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wren.Core.VM.WrenVM
的用法示例。
在下文中一共展示了WrenVM.Primitive方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadLibrary
public static void LoadLibrary(WrenVM vm)
{
vm.Interpret("io", "io", IoSource);
ObjClass file = (ObjClass)vm.FindVariable("io", "File");
vm.Primitive(file.ClassObj, "open_(_,_)", Open);
vm.Primitive(file.ClassObj, "sizePath_(_,_)", SizePath);
vm.Primitive(file, "close_(_)", Close);
vm.Primitive(file, "descriptor", Descriptor);
vm.Primitive(file, "readBytes_(_,_)", ReadBytes);
vm.Primitive(file, "size_(_)", Size);
}
示例2: LoadLibrary
public static void LoadLibrary(WrenVM vm)
{
vm.Interpret("", "", MetaLibSource);
ObjClass meta = (ObjClass)vm.FindVariable("Meta");
vm.Primitive(meta.ClassObj, "eval(_)", Eval);
}
示例3: LoadLibrary
public static void LoadLibrary(WrenVM vm)
{
vm.Interpret("scheduler", "scheduler", _schedulerSource);
ObjClass scheduler = (ObjClass)vm.FindVariable("scheduler", "Scheduler");
vm.Primitive(scheduler.ClassObj, "captureMethods_()", CaptureMethods);
vm.Interpret("scheduler", "scheduler", "Scheduler.captureMethods_()");
}
示例4: LoadIOLibrary
public static void LoadIOLibrary(WrenVM vm)
{
vm.Interpret("", IOLibSource);
ObjClass IO = (ObjClass)vm.FindVariable("IO").Obj;
vm.Primitive(IO.ClassObj, "writeString_(_)", WriteString);
vm.Primitive(IO.ClassObj, "read", Read);
vm.Primitive(IO.ClassObj, "clock", Clock);
vm.Primitive(IO.ClassObj, "time", Time);
}
示例5: LoadLibrary
public static void LoadLibrary(WrenVM vm)
{
vm.Interpret("timer", "timer", _timerSource);
ObjClass timer = (ObjClass)vm.FindVariable("timer", "Timer");
vm.Primitive(timer.ClassObj, "startTimer_(_,_)", StartTimer);
}