3 instantiations of ParsedDocument
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (3)
35return new ParsedDocument(document.Id, text, root, document.Project.GetExtendedLanguageServices()); 50return new ParsedDocument(Id, text, root, HostLanguageServices); 56return new ParsedDocument(Id, text, root, HostLanguageServices);
50 references to ParsedDocument
Microsoft.CodeAnalysis.CodeStyle.Fixes (30)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (13)
46var parsedDocument = await ParsedDocument.CreateAsync(context.Document, context.CancellationToken).ConfigureAwait(false); 55var parsedDocument = await ParsedDocument.CreateAsync(context.Document, context.CancellationToken).ConfigureAwait(false); 61var parsedDocument = await ParsedDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 65public static TSyntaxNode? TryGetRelevantNode<TSyntaxNode>(this ParsedDocument document, TextSpan span, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode 68public static TSyntaxNode? TryGetRelevantNode<TSyntaxNode>(this ParsedDocument document, TextSpan span, bool allowEmptyNode, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode 84var parsedDocument = await ParsedDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 89this ParsedDocument document, TextSpan span, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode 93this ParsedDocument document, TextSpan span, bool allowEmptyNodes, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode 102this ParsedDocument document, TextSpan span, bool allowEmptyNodes, int maxCount, ref TemporaryArray<TSyntaxNode> result, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\IRefactoringHelpersService.cs (1)
20this IRefactoringHelpersService service, ParsedDocument document, TextSpan selection, bool allowEmptyNodes, int maxCount, ref TemporaryArray<TSyntaxNode> result, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Formatting\ISyntaxFormattingService.cs (3)
15bool ShouldFormatOnTypedCharacter(ParsedDocument document, char typedChar, int caretPosition, CancellationToken cancellationToken); 16ImmutableArray<TextChange> GetFormattingChangesOnTypedCharacter(ParsedDocument document, int caretPosition, IndentationOptions indentationOptions, CancellationToken cancellationToken); 17ImmutableArray<TextChange> GetFormattingChangesOnPaste(ParsedDocument document, TextSpan textSpan, SyntaxFormattingOptions options, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (2)
17ParsedDocument document, int lineNumber, IndentationOptions options, CancellationToken cancellationToken) 39private Indenter GetIndenter(ParsedDocument document, int lineNumber, IndentationOptions options, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (3)
20IndentationResult GetIndentation(ParsedDocument document, int lineNumber, IndentationOptions options, CancellationToken cancellationToken); 29public static string GetPreferredIndentation(this SyntaxToken token, ParsedDocument document, IndentationOptions options, CancellationToken cancellationToken) 53var newDocument = document.WithChangedRoot(newRoot, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (8)
19/// should be performed synchronously or asynchronously. The <see cref="ParsedDocument"/> is then passed to a feature whose implementation is entirely synchronous. 20/// In general, any feature API that accepts <see cref="ParsedDocument"/> should be synchronous and not access <see cref="Document"/> or <see cref="Solution"/> snapshots. 31public static async ValueTask<ParsedDocument> CreateAsync(Document document, CancellationToken cancellationToken) 47public ParsedDocument WithChangedText(SourceText text, CancellationToken cancellationToken) 53public ParsedDocument WithChangedRoot(SyntaxNode root, CancellationToken cancellationToken) 59public ParsedDocument WithChange(TextChange change, CancellationToken cancellationToken) 62public ParsedDocument WithChanges(IEnumerable<TextChange> changes, CancellationToken cancellationToken) 68public IEnumerable<TextChange> GetChanges(in ParsedDocument oldDocument)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (20)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (16)
39var parsedDocument = await ParsedDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 54var updatedParsedDocument = await ParsedDocument.CreateAsync(updatedDocument, cancellationToken).ConfigureAwait(false); 62public static (SourceText text, TextSpan semicolonSpan) ConvertNamespaceDeclaration(ParsedDocument document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken) 67var updatedDocument = document.WithChangedRoot(updatedRoot, cancellationToken); 82ParsedDocument document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxAnnotation annotation) 92private static string? GetIndentation(ParsedDocument document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken) 109ParsedDocument document, string indentation, SyntaxAnnotation annotation, CancellationToken cancellationToken) 195ParsedDocument document, string indentation, SyntaxAnnotation annotation, CancellationToken cancellationToken) 241var parsedDocument = await ParsedDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 254var updatedParsedDocument = await ParsedDocument.CreateAsync(updatedDocument, cancellationToken).ConfigureAwait(false); 260ParsedDocument document, FileScopedNamespaceDeclarationSyntax namespaceDeclaration, string lineEnding, NewLinePlacement newLinePlacement, SyntaxAnnotation annotation) 382private static NamespaceDeclarationSyntax ConvertFileScopedNamespace(ParsedDocument document, FileScopedNamespaceDeclarationSyntax fileScopedNamespace, string lineEnding, NewLinePlacement newLinePlacement)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (4)
48var document = await ParsedDocument.CreateAsync(workspaceDocument, cancellationToken).ConfigureAwait(false); 110var updatedParsedDocument = document.WithChangedRoot(updatedRoot, cancellationToken); 838ParsedDocument document, TParentExpression expressionToReplace, SyntaxFormattingOptions formattingOptions) where TParentExpression : ExpressionSyntax