public override Location VisitConditional([NotNull] IConditionalOperation operation, [CanBeNull] object argument)
            {
                if (operation.IsStatement())
                {
                    var syntax = (IfStatementSyntax)operation.Syntax;
                    return(syntax.IfKeyword.GetLocation());
                }

                return(base.VisitConditional(operation, argument));
            }
Ejemplo n.º 2
0
            public override void VisitConditional([NotNull] IConditionalOperation operation)
            {
                if (operation.IsStatement())
                {
                    Location location = operation.GetLocationForKeyword();
                    CollectedIfStatements.Add(location, operation);
                }

                base.VisitConditional(operation);
            }
 public override void VisitConditional([NotNull] IConditionalOperation operation)
 {
     if (operation.IsStatement())
     {
         Visit(operation.Condition);
     }
     else
     {
         base.VisitConditional(operation);
     }
 }