當前位置: 首頁>>代碼示例>>C#>>正文


C# InterpretedFrame.Push方法代碼示例

本文整理匯總了C#中System.Management.Automation.Interpreter.InterpretedFrame.Push方法的典型用法代碼示例。如果您正苦於以下問題:C# InterpretedFrame.Push方法的具體用法?C# InterpretedFrame.Push怎麽用?C# InterpretedFrame.Push使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Management.Automation.Interpreter.InterpretedFrame的用法示例。


在下文中一共展示了InterpretedFrame.Push方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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

示例2: 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

示例3: 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

示例4: Run

 public override int Run(InterpretedFrame frame)
 {
     StrongBox<object>[] boxArray;
     if (this.ConsumedStack > 0)
     {
         boxArray = new StrongBox<object>[this.ConsumedStack];
         for (int i = boxArray.Length - 1; i >= 0; i--)
         {
             boxArray[i] = (StrongBox<object>) frame.Pop();
         }
     }
     else
     {
         boxArray = null;
     }
     Delegate delegate2 = this._creator.CreateDelegate(boxArray);
     frame.Push(delegate2);
     return 1;
 }
開發者ID:nickchal,項目名稱:pash,代碼行數:19,代碼來源:CreateDelegateInstruction.cs

示例5: Run

 public override int Run(InterpretedFrame frame)
 {
     object obj2;
     object[] parameters = new object[this._argCount];
     for (int i = this._argCount - 1; i >= 0; i--)
     {
         parameters[i] = frame.Pop();
     }
     try
     {
         obj2 = this._constructor.Invoke(parameters);
     }
     catch (TargetInvocationException exception)
     {
         ExceptionHelpers.UpdateForRethrow(exception.InnerException);
         throw exception.InnerException;
     }
     frame.Push(obj2);
     return 1;
 }
開發者ID:nickchal,項目名稱:pash,代碼行數:20,代碼來源:NewInstruction.cs

示例6: Run

 public override int Run(InterpretedFrame frame)
 {
     char ch = (char) frame.Pop();
     frame.Push(((char) frame.Pop()) > ch);
     return 1;
 }
開發者ID:nickchal,項目名稱:pash,代碼行數:6,代碼來源:GreaterThanInstruction.cs

示例7: Run

 public override int Run(InterpretedFrame frame)
 {
     ushort num = (ushort) frame.Pop();
     frame.Push(((ushort) frame.Pop()) < num);
     return 1;
 }
開發者ID:nickchal,項目名稱:pash,代碼行數:6,代碼來源:LessThanInstruction.cs

示例8: Run

 public override int Run(InterpretedFrame frame)
 {
     frame.Push(frame.Pop() == frame.Pop());
     return +1;
 }
開發者ID:40a,項目名稱:PowerShell,代碼行數:5,代碼來源:EqualInstruction.cs

示例9: Run

 public override int Run(InterpretedFrame frame)
 {
     frame.Push(((bool) frame.Pop()) != ((bool) frame.Pop()));
     return 1;
 }
開發者ID:nickchal,項目名稱:pash,代碼行數:5,代碼來源:NotEqualInstruction.cs

示例10: Run

 public override int Run(InterpretedFrame frame)
 {
     var ret = new IStrongBox[_count];
     for (int i = ret.Length - 1; i >= 0; i--)
     {
         ret[i] = (IStrongBox)frame.Pop();
     }
     frame.Push(RuntimeVariables.Create(ret));
     return +1;
 }
開發者ID:40a,項目名稱:PowerShell,代碼行數:10,代碼來源:LocalAccess.cs

示例11: Run

 public override int Run(InterpretedFrame frame)
 {
     Byte right = (Byte)frame.Pop();
     frame.Push(((Byte)frame.Pop()) > right);
     return +1;
 }
開發者ID:40a,項目名稱:PowerShell,代碼行數:6,代碼來源:GreaterThanInstruction.cs

示例12: Run

 public override int Run(InterpretedFrame frame)
 {
     frame.Push(((ulong) frame.Pop()) == ((ulong) frame.Pop()));
     return 1;
 }
開發者ID:nickchal,項目名稱:pash,代碼行數:5,代碼來源:EqualInstruction.cs

示例13: Run

 public override int Run(InterpretedFrame frame)
 {
     frame.Push(((bool) frame.Pop()) ? ScriptingRuntimeHelpers.False : ScriptingRuntimeHelpers.True);
     return 1;
 }
開發者ID:nickchal,項目名稱:pash,代碼行數:5,代碼來源:NotInstruction.cs

示例14: Run

 public override int Run(InterpretedFrame frame)
 {
     frame.Push(((SByte)frame.Pop()) != ((SByte)frame.Pop()));
     return +1;
 }
開發者ID:40a,項目名稱:PowerShell,代碼行數:5,代碼來源:NotEqualInstruction.cs

示例15: Run

 public override int Run(InterpretedFrame frame)
 {
     Double right = (Double)frame.Pop();
     frame.Push(((Double)frame.Pop()) < right);
     return +1;
 }
開發者ID:40a,項目名稱:PowerShell,代碼行數:6,代碼來源:LessThanInstruction.cs


注:本文中的System.Management.Automation.Interpreter.InterpretedFrame.Push方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。