mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Integrate changes between [SD:717473] and [SD:725290]
This commit is contained in:
1 parent
2280bea11e
commit
0dd425da19
28 files changed
+848
-342
No files matched your search
@@ -1828,7 +1828,7 @@ namespace System.Management.Automation
|
||||
|
||||
if (_scriptBlock.HasBeginBlock)
|
||||
{
|
||||
RunClause(_runOptimized ? _scriptBlock.BeginBlock : _scriptBlock.UnoptimizedBeginBlock, AutomationNull.Value, _input.GetEnumerator());
|
||||
RunClause(_runOptimized ? _scriptBlock.BeginBlock : _scriptBlock.UnoptimizedBeginBlock, AutomationNull.Value, _input);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1851,7 +1851,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
if (_scriptBlock.HasProcessBlock)
|
||||
{
|
||||
RunClause(_runOptimized ? _scriptBlock.ProcessBlock : _scriptBlock.UnoptimizedProcessBlock, dollarUnder, _input.GetEnumerator());
|
||||
RunClause(_runOptimized ? _scriptBlock.ProcessBlock : _scriptBlock.UnoptimizedProcessBlock, dollarUnder, _input);
|
||||
_input.Clear();
|
||||
}
|
||||
}
|
||||
@@ -1865,7 +1865,7 @@ namespace System.Management.Automation
|
||||
|
||||
if (_scriptBlock.HasEndBlock)
|
||||
{
|
||||
RunClause(_runOptimized ? _scriptBlock.EndBlock : _scriptBlock.UnoptimizedEndBlock, AutomationNull.Value, _input.ToArray().GetEnumerator());
|
||||
RunClause(_runOptimized ? _scriptBlock.EndBlock : _scriptBlock.UnoptimizedEndBlock, AutomationNull.Value, _input.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1125,7 +1125,8 @@ namespace System.Management.Automation
|
||||
try
|
||||
{
|
||||
var converterInstance = Utils.GetAstToWorkflowConverterAndEnsureWorkflowModuleLoaded(context);
|
||||
var workflows = converterInstance.CompileWorkflows(scriptBlockAst, context.EngineSessionState.Module, null, out parseErrors);
|
||||
PSLanguageMode? languageMode = (context != null) ? context.LanguageMode : (PSLanguageMode?) null;
|
||||
var workflows = converterInstance.CompileWorkflows(scriptBlockAst, context.EngineSessionState.Module, null, languageMode, out parseErrors);
|
||||
foreach (var workflow in workflows)
|
||||
{
|
||||
context.EngineSessionState.SetWorkflowRaw(workflow,
|
||||
|
||||
Reference in new issue
Block a user