本文整理汇总了C#中System.Management.Automation.Interpreter.InterpretedFrame类的典型用法代码示例。如果您正苦于以下问题:C# InterpretedFrame类的具体用法?C# InterpretedFrame怎么用?C# InterpretedFrame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InterpretedFrame类属于System.Management.Automation.Interpreter命名空间,在下文中一共展示了InterpretedFrame类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Run
public override int Run(InterpretedFrame frame)
{
int index = frame.StackIndex - this._argumentCount;
frame.Data[index] = this._site.Target(this._site, new ArgumentArray(frame.Data, index, this._argumentCount));
frame.StackIndex = index + 1;
return 1;
}
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:DynamicSplatInstruction.cs
示例2: Run
public override int Run(InterpretedFrame frame)
{
object obj2 = frame.Pop();
object obj3 = frame.Pop();
frame.Push(ScriptingRuntimeHelpers.BooleanToObject((obj3 != null) && (obj3.GetType() == obj2)));
return 1;
}
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:TypeEqualsInstruction.cs
示例3: Run
public override int Run(InterpretedFrame frame)
{
object obj2 = frame.Pop();
object obj3 = frame.Pop();
this._field.SetValue(obj3, obj2);
return 1;
}
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:StoreFieldInstruction.cs
示例4: Enter
internal System.Management.Automation.Interpreter.ThreadLocal<InterpretedFrame>.StorageInfo Enter()
{
var storageInfo = CurrentFrame.GetStorageInfo();
this._parent = storageInfo.Value;
storageInfo.Value = this;
return storageInfo;
}
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:InterpretedFrame.cs
示例5: Run
public override int Run(InterpretedFrame frame)
{
object value = frame.Pop();
object self = frame.Pop();
_field.SetValue(self, value);
return +1;
}
开发者ID:40a,项目名称:PowerShell,代码行数:7,代码来源:FieldOperations.cs
示例6: Run
public override int Run(InterpretedFrame frame)
{
object obj2 = frame.Data[frame.StackIndex - 2];
object obj3 = frame.Data[frame.StackIndex - 1];
frame.Data[frame.StackIndex - 2] = (short) (((short) obj2) * ((short) obj3));
frame.StackIndex--;
return 1;
}
开发者ID:nickchal,项目名称:pash,代码行数:8,代码来源:MulOvfInstruction.cs
示例7: Run
public override int Run(InterpretedFrame frame)
{
if ((bool) frame.Pop())
{
return base._offset;
}
return 1;
}
开发者ID:nickchal,项目名称:pash,代码行数:8,代码来源:BranchTrueInstruction.cs
示例8: Run
public override int Run(InterpretedFrame frame)
{
object obj2 = frame.Data[frame.StackIndex - 2];
object obj3 = frame.Data[frame.StackIndex - 1];
frame.Data[frame.StackIndex - 2] = ((double) obj2) + ((double) obj3);
frame.StackIndex--;
return 1;
}
开发者ID:nickchal,项目名称:pash,代码行数:8,代码来源:AddOvfInstruction.cs
示例9: Run
public override int Run(InterpretedFrame frame)
{
object l = frame.Data[frame.StackIndex - 2];
object r = frame.Data[frame.StackIndex - 1];
frame.Data[frame.StackIndex - 2] = (UInt32)unchecked((UInt32)l - (UInt32)r);
frame.StackIndex--;
return +1;
}
开发者ID:40a,项目名称:PowerShell,代码行数:8,代码来源:SubInstruction.cs
示例10: Run
public override int Run(InterpretedFrame frame)
{
if (frame.Peek() != null)
{
return base._offset;
}
return 1;
}
开发者ID:nickchal,项目名称:pash,代码行数:8,代码来源:CoalescingBranchInstruction.cs
示例11: Run
public override int Run(InterpretedFrame frame)
{
object l = frame.Data[frame.StackIndex - 2];
object r = frame.Data[frame.StackIndex - 1];
frame.Data[frame.StackIndex - 2] = (UInt16)((UInt16)l / (UInt16)r);
frame.StackIndex--;
return 1;
}
开发者ID:40a,项目名称:PowerShell,代码行数:8,代码来源:DivInstruction.cs
示例12: Run
public override int Run(InterpretedFrame frame)
{
frame.PopPendingContinuation();
if (!frame.IsJumpHappened())
{
return 1;
}
return frame.YieldToPendingContinuation();
}
开发者ID:nickchal,项目名称:pash,代码行数:9,代码来源:LeaveFinallyInstruction.cs
示例13: GotoHandler
internal int GotoHandler(InterpretedFrame frame, object exception, out ExceptionHandler handler)
{
handler = this._handlers.FirstOrDefault<ExceptionHandler>(t => t.Matches(exception.GetType()));
if (handler == null)
{
return 0;
}
return frame.Goto(handler.LabelIndex, exception, true);
}
开发者ID:nickchal,项目名称:pash,代码行数:9,代码来源:TryCatchFinallyHandler.cs
示例14: Run
public override int Run(InterpretedFrame frame)
{
int num;
if (!this._cases.TryGetValue((int) frame.Pop(), out num))
{
return 1;
}
return num;
}
开发者ID:nickchal,项目名称:pash,代码行数:9,代码来源:SwitchInstruction.cs
示例15: Run
public override int Run(InterpretedFrame frame)
{
Exception exception = (Exception) frame.Pop();
if (this._rethrow)
{
throw new RethrowException();
}
throw exception;
}
开发者ID:nickchal,项目名称:pash,代码行数:9,代码来源:ThrowInstruction.cs
示例16: Run
public override int Run(InterpretedFrame frame)
{
int first = frame.StackIndex - _argumentCount;
object ret = _site.Target(_site, new ArgumentArray(frame.Data, first, _argumentCount));
frame.Data[first] = ret;
frame.StackIndex = first + 1;
return 1;
}
开发者ID:40a,项目名称:PowerShell,代码行数:9,代码来源:DynamicSplatInstruction.cs
示例17: Run
public override int Run(InterpretedFrame frame)
{
IStrongBox[] boxes = new IStrongBox[this._count];
for (int i = boxes.Length - 1; i >= 0; i--)
{
boxes[i] = (IStrongBox) frame.Pop();
}
frame.Push(System.Management.Automation.Interpreter.RuntimeVariables.Create(boxes));
return 1;
}
开发者ID:nickchal,项目名称:pash,代码行数:10,代码来源:RuntimeVariablesInstruction.cs
示例18: Run
public override int Run(InterpretedFrame frame)
{
if (!frame.IsJumpHappened())
{
frame.SetStackDepth(base.GetLabel(frame).StackDepth);
}
frame.PushPendingContinuation();
frame.RemoveContinuation();
return 1;
}
开发者ID:nickchal,项目名称:pash,代码行数:10,代码来源:EnterFinallyInstruction.cs
示例19: Run
public void Run(InterpretedFrame frame)
{
Instruction[] instructions = this._instructions.Instructions;
int instructionIndex = frame.InstructionIndex;
while (instructionIndex < instructions.Length)
{
instructionIndex += instructions[instructionIndex].Run(frame);
frame.InstructionIndex = instructionIndex;
}
}
开发者ID:nickchal,项目名称:pash,代码行数:10,代码来源:Interpreter.cs
示例20: Run
public override int Run(InterpretedFrame frame)
{
int[] lengths = new int[this._rank];
for (int i = this._rank - 1; i >= 0; i--)
{
lengths[i] = (int) frame.Pop();
}
Array array = Array.CreateInstance(this._elementType, lengths);
frame.Push(array);
return 1;
}
开发者ID:nickchal,项目名称:pash,代码行数:11,代码来源:NewArrayBoundsInstruction.cs
注:本文中的System.Management.Automation.Interpreter.InterpretedFrame类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论