Exemplo n.º 1
0
                private void Remove([NotNull] IConditionalOperation ifStatementToRemove,
                                    [NotNull] IDictionary <Location, IConditionalOperation> ifStatements)
                {
                    Location location = ifStatementToRemove.GetLocationForKeyword();

                    ifStatements.Remove(location);
                }
Exemplo n.º 2
0
                public IfElseIfConstructAnalyzer([NotNull] IfStatementAnalyzer owner,
                                                 [NotNull] IConditionalOperation topIfStatement)
                {
                    this.owner = owner;

                    topIfKeywordLocation = topIfStatement.GetLocationForKeyword();
                    ifStatement          = topIfStatement;
                }
Exemplo n.º 3
0
            public override void VisitConditional([NotNull] IConditionalOperation operation)
            {
                if (operation.IsStatement())
                {
                    Location location = operation.GetLocationForKeyword();
                    CollectedIfStatements.Add(location, operation);
                }

                base.VisitConditional(operation);
            }