Beispiel #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));
        }
Beispiel #2
0
        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 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);
 }
Beispiel #4
0
 void IAstVisitor.VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
 {
     Visit(EnterAnonymousMethodExpression, LeaveAnonymousMethodExpression, anonymousMethodExpression);
 }