public Update ( System.Linq.Expressions.ParameterExpression variable, |
||
variable | System.Linq.Expressions.ParameterExpression | The |
filter | The |
|
body | The |
|
return |
protected override CatchBlock VisitCatchBlock(CatchBlock node) { if (node.Variable != null) { _environment.Push(new[] { node.Variable }); } // // Just visit children to perform inlining of constants or defaults. Note that the parent // try expression requires that non-trivial bindings are satisfied by the protected region // so we don't have to worry about that over here. // var filter = Visit(node.Filter); var body = Visit(node.Body); if (node.Variable != null) { _environment.Pop(); } return(node.Update(node.Variable, filter, body)); }
private CatchBlock VisitCatchBlockExtracted(CatchBlock node) { return(node.Update(node.Variable == null ? null : VisitAndConvert(node.Variable, nameof(VisitCatchBlock)), Visit(node.Filter), Visit(node.Body))); }
/// <summary> /// Visits the children of the <see cref="CatchBlock"/>. /// </summary> /// <param name="node">The expression to visit.</param> /// <returns>The modified expression, if it or any subexpression was modified; /// otherwise, returns the original expression.</returns> protected virtual CatchBlock VisitCatchBlock(CatchBlock node) { return(node.Update(VisitAndConvert(node.Variable, nameof(VisitCatchBlock)), Visit(node.Filter), Visit(node.Body))); }
protected virtual CatchBlock VisitCatchBlock(CatchBlock node) { return(node.Update(this.VisitAndConvert <ParameterExpression>(node.Variable, "VisitCatchBlock"), this.Visit(node.Filter), this.Visit(node.Body))); }