3 instantiations of ParsedDocument
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (3)
35
return new
ParsedDocument
(document.Id, text, root, document.Project.GetExtendedLanguageServices());
50
return new
ParsedDocument
(Id, text, root, HostLanguageServices);
56
return new
ParsedDocument
(Id, text, root, HostLanguageServices);
50 references to ParsedDocument
Microsoft.CodeAnalysis.CodeStyle.Fixes (30)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (13)
46
var
parsedDocument = await
ParsedDocument
.CreateAsync(context.Document, context.CancellationToken).ConfigureAwait(false);
55
var
parsedDocument = await
ParsedDocument
.CreateAsync(context.Document, context.CancellationToken).ConfigureAwait(false);
61
var
parsedDocument = await
ParsedDocument
.CreateAsync(document, cancellationToken).ConfigureAwait(false);
65
public static TSyntaxNode? TryGetRelevantNode<TSyntaxNode>(this
ParsedDocument
document, TextSpan span, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
68
public static TSyntaxNode? TryGetRelevantNode<TSyntaxNode>(this
ParsedDocument
document, TextSpan span, bool allowEmptyNode, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
84
var
parsedDocument = await
ParsedDocument
.CreateAsync(document, cancellationToken).ConfigureAwait(false);
89
this
ParsedDocument
document, TextSpan span, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
93
this
ParsedDocument
document, TextSpan span, bool allowEmptyNodes, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
102
this
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)
20
this 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)
15
bool ShouldFormatOnTypedCharacter(
ParsedDocument
document, char typedChar, int caretPosition, CancellationToken cancellationToken);
16
ImmutableArray<TextChange> GetFormattingChangesOnTypedCharacter(
ParsedDocument
document, int caretPosition, IndentationOptions indentationOptions, CancellationToken cancellationToken);
17
ImmutableArray<TextChange> GetFormattingChangesOnPaste(
ParsedDocument
document, TextSpan textSpan, SyntaxFormattingOptions options, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (2)
17
ParsedDocument
document, int lineNumber, IndentationOptions options, CancellationToken cancellationToken)
39
private Indenter GetIndenter(
ParsedDocument
document, int lineNumber, IndentationOptions options, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (3)
20
IndentationResult GetIndentation(
ParsedDocument
document, int lineNumber, IndentationOptions options, CancellationToken cancellationToken);
29
public static string GetPreferredIndentation(this SyntaxToken token,
ParsedDocument
document, IndentationOptions options, CancellationToken cancellationToken)
53
var
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.
31
public static async ValueTask<
ParsedDocument
> CreateAsync(Document document, CancellationToken cancellationToken)
47
public
ParsedDocument
WithChangedText(SourceText text, CancellationToken cancellationToken)
53
public
ParsedDocument
WithChangedRoot(SyntaxNode root, CancellationToken cancellationToken)
59
public
ParsedDocument
WithChange(TextChange change, CancellationToken cancellationToken)
62
public
ParsedDocument
WithChanges(IEnumerable<TextChange> changes, CancellationToken cancellationToken)
68
public IEnumerable<TextChange> GetChanges(in
ParsedDocument
oldDocument)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (20)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (16)
39
var
parsedDocument = await
ParsedDocument
.CreateAsync(document, cancellationToken).ConfigureAwait(false);
54
var
updatedParsedDocument = await
ParsedDocument
.CreateAsync(updatedDocument, cancellationToken).ConfigureAwait(false);
62
public static (SourceText text, TextSpan semicolonSpan) ConvertNamespaceDeclaration(
ParsedDocument
document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken)
67
var
updatedDocument = document.WithChangedRoot(updatedRoot, cancellationToken);
82
ParsedDocument
document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxAnnotation annotation)
92
private static string? GetIndentation(
ParsedDocument
document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken)
109
ParsedDocument
document, string indentation, SyntaxAnnotation annotation, CancellationToken cancellationToken)
195
ParsedDocument
document, string indentation, SyntaxAnnotation annotation, CancellationToken cancellationToken)
241
var
parsedDocument = await
ParsedDocument
.CreateAsync(document, cancellationToken).ConfigureAwait(false);
254
var
updatedParsedDocument = await
ParsedDocument
.CreateAsync(updatedDocument, cancellationToken).ConfigureAwait(false);
260
ParsedDocument
document, FileScopedNamespaceDeclarationSyntax namespaceDeclaration, string lineEnding, NewLinePlacement newLinePlacement, SyntaxAnnotation annotation)
382
private static NamespaceDeclarationSyntax ConvertFileScopedNamespace(
ParsedDocument
document, FileScopedNamespaceDeclarationSyntax fileScopedNamespace, string lineEnding, NewLinePlacement newLinePlacement)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (4)
48
var
document = await
ParsedDocument
.CreateAsync(workspaceDocument, cancellationToken).ConfigureAwait(false);
110
var
updatedParsedDocument = document.WithChangedRoot(updatedRoot, cancellationToken);
838
ParsedDocument
document, TParentExpression expressionToReplace, SyntaxFormattingOptions formattingOptions) where TParentExpression : ExpressionSyntax