Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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;
            }
        }
Exemplo n.º 3
0
 void IAstVisitor.VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
 {
     Visit(EnterAnonymousMethodExpression, LeaveAnonymousMethodExpression, anonymousMethodExpression);
 }