private void Remove([NotNull] IConditionalOperation ifStatementToRemove, [NotNull] IDictionary <Location, IConditionalOperation> ifStatements) { Location location = ifStatementToRemove.TryGetLocationForKeyword(); ifStatements.Remove(location); }
public IfElseIfConstructAnalyzer([NotNull] IfStatementAnalyzer owner, [NotNull] IConditionalOperation topIfStatement) { this.owner = owner; topIfKeywordLocation = topIfStatement.TryGetLocationForKeyword(); ifStatement = topIfStatement; }
public override void VisitConditional([NotNull] IConditionalOperation operation) { if (operation.IsStatement()) { Location location = operation.TryGetLocationForKeyword(); if (location != null) { CollectedIfStatements.Add(location, operation); } } base.VisitConditional(operation); }