Example #1
0
        private void CommentOutMethod(MethodDeclarationSyntax methodDeclaration)
        {
            // Get the method as a series of strings and give the reason it was removed
            var newComments = methodDeclaration.AsStringsByLine().Prepend(Constants.UnusableCodeComment);

            if (_endOfClassComments.Any())
            {
                // Prepend an extra space to get separation from last commented method
                newComments = newComments.Prepend(string.Empty);
            }

            _endOfClassComments = _endOfClassComments.Concat(newComments);
        }