Esempio n. 1
0
        private void RemoveDeclaration(string variableName, BlockSyntax block, DocumentEditor editor)
        {
            var node         = block.GetLocalDeclaredVariables().SingleVariable(variableName);
            var nodeToDelete = node.AncestorsAndSelf().OfType <LocalDeclarationStatementSyntax>().First();

            editor.RemoveNode(nodeToDelete);
        }