public void ComputeRefactoringsForTrivia()
        {
            SyntaxTrivia trivia = Root.FindTrivia(Span.Start);

            Debug.WriteLine(trivia.Kind().ToString());

            switch (trivia.Kind())
            {
            case SyntaxKind.SingleLineCommentTrivia:
            {
                if (IsRefactoringEnabled(RefactoringIdentifiers.Uncomment))
                {
                    RegisterRefactoring(
                        "Uncomment",
                        cancellationToken => UncommentRefactoring.RefactorAsync(Document, trivia, cancellationToken));
                }

                if (IsRefactoringEnabled(RefactoringIdentifiers.ReplaceCommentWithDocumentationComment) &&
                    ReplaceCommentWithDocumentationCommentRefactoring.IsFixable(trivia))
                {
                    RegisterRefactoring(
                        ReplaceCommentWithDocumentationCommentRefactoring.Title,
                        cancellationToken => ReplaceCommentWithDocumentationCommentRefactoring.RefactorAsync(Document, (MemberDeclarationSyntax)trivia.Token.Parent, cancellationToken));
                }

                break;
            }
            }

            if (!trivia.IsPartOfStructuredTrivia())
            {
                CommentTriviaRefactoring.ComputeRefactorings(this, trivia);
            }
        }
        public void ComputeRefactoringsForTrivia()
        {
            SyntaxTrivia trivia = Root.FindTrivia(Span.Start);

            SyntaxKind kind = trivia.Kind();

            if (kind == SyntaxKind.SingleLineCommentTrivia)
            {
                if (IsRefactoringEnabled(RefactoringIdentifiers.UncommentSingleLineComment))
                {
                    RegisterRefactoring(
                        "Uncomment",
                        cancellationToken => UncommentSingleLineCommentRefactoring.RefactorAsync(Document, trivia, cancellationToken),
                        RefactoringIdentifiers.UncommentSingleLineComment);
                }

                if (IsRefactoringEnabled(RefactoringIdentifiers.ReplaceCommentWithDocumentationComment))
                {
                    TextSpan fixableSpan = ReplaceCommentWithDocumentationCommentAnalysis.GetFixableSpan(trivia);

                    if (!fixableSpan.IsEmpty)
                    {
                        RegisterRefactoring(
                            ReplaceCommentWithDocumentationCommentRefactoring.Title,
                            cancellationToken => ReplaceCommentWithDocumentationCommentRefactoring.RefactorAsync(Document, (MemberDeclarationSyntax)trivia.Token.Parent, fixableSpan, cancellationToken),
                            RefactoringIdentifiers.ReplaceCommentWithDocumentationComment);
                    }
                }
            }
            else if (kind == SyntaxKind.MultiLineCommentTrivia)
            {
                if (IsRefactoringEnabled(RefactoringIdentifiers.UncommentMultiLineComment))
                {
                    UncommentMultiLineCommentRefactoring.ComputeRefactoring(this, trivia);
                }
            }

            if (!trivia.IsPartOfStructuredTrivia())
            {
                CommentTriviaRefactoring.ComputeRefactorings(this, trivia);
            }
        }