private void RemoveVariableDeclarations() { var parentTargetNodes = _methodGenerator.ExtractedStatements.Select(m => m.TargetStatement.Parent); _currentClassNode = _currentClassNode.TrackNodes(parentTargetNodes); RemoveLeadingLine(_currentClassNode.GetCurrentNodes(parentTargetNodes)); _currentClassNode = _currentClassNode.RemoveNodes(_currentClassNode.GetCurrentNodes(parentTargetNodes), SyntaxRemoveOptions.KeepNoTrivia); }