Example #1
0
 protected override Task HandleDeclarationAsync(
     Document document,
     SyntaxEditor editor,
     TypeSyntax node,
     CancellationToken cancellationToken
     ) =>
 UseExplicitTypeCodeFixProvider.HandleDeclarationAsync(
     document,
     editor,
     node,
     cancellationToken
     );
        private static async Task <Document> UpdateDocumentAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
        {
            var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);

            var editor = new SyntaxEditor(root, document.Project.Solution.Workspace);

            await UseExplicitTypeCodeFixProvider.HandleDeclarationAsync(document, editor, node, cancellationToken).ConfigureAwait(false);

            var newRoot = editor.GetChangedRoot();

            return(document.WithSyntaxRoot(newRoot));
        }