コード例 #1
0
 public static ScriptBlockExpressionAst Update(
     this ScriptBlockExpressionAst ast,
     ScriptBlockAst scriptBlock = null)
 {
     return(new ScriptBlockExpressionAst(
                ast.Extent,
                scriptBlock?.Clone() ?? ast.ScriptBlock?.Clone()));
 }
コード例 #2
0
 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()));
 }