本文整理汇总了C#中Iodine.Runtime.VirtualMachine.InvokeMethod方法的典型用法代码示例。如果您正苦于以下问题:C# VirtualMachine.InvokeMethod方法的具体用法?C# VirtualMachine.InvokeMethod怎么用?C# VirtualMachine.InvokeMethod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Iodine.Runtime.VirtualMachine
的用法示例。
在下文中一共展示了VirtualMachine.InvokeMethod方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Set
public IodineObject Set(VirtualMachine vm, IodineObject value)
{
if (Setter is IodineMethod) {
return vm.InvokeMethod ((IodineMethod)Setter, self, new IodineObject[] { value });
} else if (Setter is IodineInstanceMethodWrapper) {
return vm.InvokeMethod (((IodineInstanceMethodWrapper)Setter).Method, self,
new IodineObject[] { value });
}
return Setter.Invoke (vm, new IodineObject[] { value });
}
示例2: Get
public IodineObject Get(VirtualMachine vm)
{
if (Getter is IodineMethod) {
return vm.InvokeMethod ((IodineMethod)Getter, self, new IodineObject[0]);
} else if (Getter is IodineInstanceMethodWrapper) {
return vm.InvokeMethod (((IodineInstanceMethodWrapper)Getter).Method, self,
new IodineObject[0]);
}
return Getter.Invoke (vm, new IodineObject[0]);
}
示例3: IterMoveNext
public override bool IterMoveNext(VirtualMachine vm)
{
if (stackFrame.AbortExecution) {
return false;
}
value = vm.InvokeMethod (baseMethod, stackFrame, self, arguments);
return stackFrame.Yielded;
}
示例4: Invoke
public override IodineObject Invoke (VirtualMachine vm, IodineObject[] arguments)
{
if (!initializerInvoked) {
initializerInvoked = true;
Initializer.Invoke (vm, new IodineObject[] { });
}
IodineObject obj = new IodineObject (this);
BindAttributes (obj);
vm.InvokeMethod (Constructor, obj, arguments);
return obj;
}
示例5: Invoke
public override IodineObject Invoke (VirtualMachine vm, IodineObject[] arguments)
{
return vm.InvokeMethod (Target, frame.Duplicate (vm.Top, Target.LocalCount),
frame.Self, arguments);
}
示例6: Invoke
public override IodineObject Invoke (VirtualMachine vm, IodineObject[] arguments)
{
if (Method.Generator)
return new IodineGenerator (vm.Top, this, arguments);
return vm.InvokeMethod (Method, Self, arguments);
}