private async Task<Solution> MoveToNewFile(Document document, ClassDeclarationSyntax classDeclaration, CancellationToken cancellationToken)
        {
            var className = classDeclaration.Identifier.Text;

            var syntaxRoot = await document.GetSyntaxRootAsync();
            var newNamespace = classDeclaration
                .FirstAncestorOrSelf<NamespaceDeclarationSyntax>()
                .WithMembers(SyntaxFactory.List(new[] { (MemberDeclarationSyntax)classDeclaration }));
            var compilationUnit = SyntaxFactory.CompilationUnit()
                .WithMembers(SyntaxFactory.List(new[] { (MemberDeclarationSyntax)newNamespace }))
                .WithUsings(SyntaxFactory.List(syntaxRoot.DescendantNodes().OfType<UsingDirectiveSyntax>()))
                .WithAdditionalAnnotations(Formatter.Annotation);

            var newDocument = document.Project.AddDocument(className + ".cs", string.Empty, folders: document.Folders).WithSyntaxRoot(compilationUnit);
            newDocument = newDocument.Project
                .GetDocument(document.Id)
                .WithSyntaxRoot(syntaxRoot.RemoveNode(classDeclaration, SyntaxRemoveOptions.KeepNoTrivia));

            return newDocument.Project.Solution;
        }