protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) { AnonymousMethodExpression o = other as AnonymousMethodExpression; return(o != null && this.IsAsync == o.IsAsync && this.HasParameterList == o.HasParameterList && this.Parameters.DoMatch(o.Parameters, match) && this.Body.DoMatch(o.Body, match)); }
public override void VisitAnonymousMethodExpression(AnonymousMethodExpression lambdaExpression) { FormatArguments(lambdaExpression); if (!lambdaExpression.Body.IsNull) { var old = curIndent; this.curIndent = curIndent.GetIndentWithoutSpace(); FixOpenBrace(policy.AnonymousMethodBraceStyle, lambdaExpression.Body.LBraceToken); VisitBlockWithoutFixingBraces(lambdaExpression.Body, policy.IndentBlocks); FixClosingBrace(policy.AnonymousMethodBraceStyle, lambdaExpression.Body.RBraceToken); curIndent = old; } }
void IAstVisitor.VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression) { Visit(EnterAnonymousMethodExpression, LeaveAnonymousMethodExpression, anonymousMethodExpression); }