コード例 #1
0
ファイル: ScriptBlockProcessor.cs プロジェクト: mauve/Pash
 /// <summary>
 /// Create the scope for this script block and binding arguments in it
 /// </summary>
 public override void Prepare()
 {
     // TODO: check if it makes sense to move the scope handling to the PipelineProcessor!
     //Let's see on the long run if there is an easier solution for this #ExecutionContextChange
     CreateOwnScope();
     SwitchToOwnScope();
     try
     {
         MergeParameters();
         _argumentBinder = new ScriptBlockParameterBinder(_scriptBlockInfo.GetParameters(), ExecutionContext,
                                                          _scopedExecutionVisitor);
         _argumentBinder.BindCommandLineParameters(Parameters);
     }
     finally
     {
         RestoreOriginalScope();
     }
 }
コード例 #2
0
 /// <summary>
 /// Create the scope for this script block and binding arguments in it
 /// </summary>
 public override void Prepare()
 {
     // TODO: check if it makes sense to move the scope handling to the PipelineProcessor!
     //Let's see on the long run if there is an easier solution for this #ExecutionContextChange
     CreateOwnScope();
     SwitchToOwnScope();
     try
     {
         MergeParameters();
         _argumentBinder = new ScriptBlockParameterBinder(_scriptBlockInfo.GetParameters(), ExecutionContext,
                                                          _scopedExecutionVisitor);
         _argumentBinder.BindCommandLineParameters(Parameters);
     }
     finally
     {
         RestoreOriginalScope();
     }
 }