private string GetOutputFileName(FileRedirectionAst redirectionAst) { object outputPath = _visitor.EvaluateAst(redirectionAst.Location, false); if (outputPath != null) { return(outputPath.ToString()); } return(null); }
private void FilterByScript() { ExecutionContext.SetVariable("_", InputObject); var executionVisitor = new ExecutionVisitor(ExecutionContext, (PipelineCommandRuntime)CommandRuntime); object result = executionVisitor.EvaluateAst(FilterScript.Ast, true); if (IsTrue(result)) { WriteObject(InputObject); } }