public static ScriptBlockExpressionAst Update( this ScriptBlockExpressionAst ast, ScriptBlockAst scriptBlock = null) { return(new ScriptBlockExpressionAst( ast.Extent, scriptBlock?.Clone() ?? ast.ScriptBlock?.Clone())); }
public static FunctionDefinitionAst Update( this FunctionDefinitionAst ast, string name = null, ScriptBlockAst body = null, IEnumerable <ParameterAst> parameters = null, bool?isFilter = null, bool?isWorkflow = null) { return(new FunctionDefinitionAst( ast.Extent, isFilter ?? ast.IsFilter, isWorkflow ?? ast.IsWorkflow, name ?? ast.Name, parameters?.CloneAll() ?? ast.Parameters?.CloneAll(), body.Clone() ?? ast.Body.Clone())); }