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)); }
S IAstVisitor <T, S> .VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression, T data) { var handler = AnonymousMethodExpressionVisited; if (handler != null) { handler(anonymousMethodExpression, data); } return(VisitChildren(anonymousMethodExpression, data)); }
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; } }
public override void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression) { if (!anonymousMethodExpression.Body.IsNull) { if (anonymousMethodExpression.Body.LBraceToken.GetNextNode(NoWhitespacePredicate) != anonymousMethodExpression.Body.RBraceToken) { FixOpenBrace(policy.AnonymousMethodBraceStyle, anonymousMethodExpression.Body.LBraceToken); VisitBlockWithoutFixingBraces(anonymousMethodExpression.Body, policy.IndentBlocks); FixClosingBrace(policy.AnonymousMethodBraceStyle, anonymousMethodExpression.Body.RBraceToken); } else { VisitBlockWithoutFixingBraces(anonymousMethodExpression.Body, policy.IndentBlocks); } return; } base.VisitAnonymousMethodExpression(anonymousMethodExpression); }
void IAstVisitor.VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression) { Visit(EnterAnonymousMethodExpression, LeaveAnonymousMethodExpression, anonymousMethodExpression); }
public virtual S VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression, T data) { return(VisitChildren(anonymousMethodExpression, data)); }
public virtual S VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression, T data) { throw new NotImplementedException(); }