public SyntaxNode Remove(SyntaxNode root) { var properties = new PropertyExtractor().Extraxt(root, SyntaxKind.PrivateKeyword); // TODO: 1. Fix the issue with touching the namespaces 2.Remove the conditional operator return(properties.Count == 0 ? null : root.RemovePrivateTokens(properties)); }
public SyntaxNode Remove(SyntaxNode root) { var properties = new PropertyExtractor().Extraxt(root, SyntaxKind.PrivateKeyword); if (isReportOnlyMode) { foreach (var prop in properties) { var lineSpan = prop.GetFileLinePosSpan(); AddReport(new ChangesReport(root) { LineNumber = lineSpan.StartLinePosition.Line, Column = lineSpan.StartLinePosition.Character, Message = "private property --> private can be removed", Generator = nameof(PropertyTokenRemover) }); } } // TODO: 1. Fix the issue with touching the namespaces 2.Remove the conditional operator return(properties.Count == 0 ? null : root.RemovePrivateTokens(properties)); }