32 references to Snapshot
Microsoft.CodeAnalysis.Razor.Workspaces (29)
CodeActions\CSharp\UnformattedRemappingCSharpCodeActionResolver.cs (1)
57var codeDocument = await documentContext.Snapshot.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false);
CodeActions\Html\HtmlCodeActionResolver.cs (1)
23await HtmlCodeActionProvider.MapAndFixHtmlCodeActionEditAsync(_razorEditService, documentContext.Snapshot, codeAction, cancellationToken).ConfigureAwait(false);
CodeActions\Razor\AddUsingsCodeActionResolver.cs (1)
29var documentSnapshot = documentContext.Snapshot;
CodeActions\Razor\CreateComponentCodeActionResolver.cs (1)
36if (!documentContext.Snapshot.FileKind.IsComponent())
CodeActions\Razor\ExtractToCodeBehindCodeActionResolver.cs (1)
52codeBehindContent = await _roslynCodeActionHelpers.GetFormattedNewFileContentsAsync(documentContext.Snapshot.Project, codeBehindUri, codeBehindContent, cancellationToken).ConfigureAwait(false);
CodeActions\Razor\GenerateEventHandlerCodeActionResolver.cs (1)
92var csharpSyntaxTree = await documentContext.Snapshot.GetCSharpSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
CodeActions\Razor\PromoteUsingCodeActionResolver.cs (1)
37var importsFileName = PromoteUsingCodeActionProvider.GetImportsFileName(documentContext.Snapshot.FileKind);
DocumentMapping\RazorEditService_WorkspaceEdit.cs (1)
150var mappedEdits = await MapCSharpEditsAsync(textChanges, documentContext.Snapshot, includeCSharpLanguageFeatureEdits: true, cancellationToken).ConfigureAwait(false);
Formatting\RazorFormattingService.cs (15)
70var codeDocument = await documentContext.Snapshot.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false); 95var logger = _formattingLoggerFactory.CreateLogger(documentContext.Snapshot.FilePath, range is null ? "Full" : "Range"); 96logger?.LogObject("FileKind", documentContext.Snapshot.FileKind); 104var documentSnapshot = documentContext.Snapshot; 105var hostDocumentVersion = documentContext.Snapshot.Version; 140var documentSnapshot = documentContext.Snapshot; 142var codeDocument = await documentContext.Snapshot.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false); 161var documentSnapshot = documentContext.Snapshot; 164var codeDocument = await documentContext.Snapshot.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false); 183var documentSnapshot = documentContext.Snapshot; 185var codeDocument = await documentContext.Snapshot.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false); 208var documentSnapshot = documentContext.Snapshot; 210var codeDocument = await documentContext.Snapshot.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false); 235var documentSnapshot = documentContext.Snapshot; 237var codeDocument = await documentContext.Snapshot.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false);
ProjectSystem\DocumentContext.cs (2)
36var codeDocument = await Snapshot 55var sourceText = await Snapshot.GetTextAsync(cancellationToken).ConfigureAwait(false);
Rename\RenameService.cs (2)
40if (!documentContext.Snapshot.FileKind.IsComponent()) 96var oldPath = documentContext.Snapshot.FilePath;
SemanticTokens\AbstractRazorSemanticTokensInfoService.cs (2)
100_logger.LogDebug($"Couldn't get C# tokens for version {documentContext.Snapshot.Version} of {documentContext.Uri}. Returning null"); 132_logger.LogDebug($"Requesting C# semantic tokens for host version {documentContext.Snapshot.Version}, correlation ID {correlationId}, and the server thinks there are {codeDocument.GetCSharpSourceText().Lines.Count} lines of C#");
Microsoft.CodeAnalysis.Remote.Razor (3)
ProjectSystem\RemoteDocumentContext.cs (1)
13public new RemoteDocumentSnapshot Snapshot => (RemoteDocumentSnapshot)base.Snapshot;
SemanticTokens\RemoteCSharpSemanticTokensProvider.cs (1)
38var snapshot = (RemoteDocumentSnapshot)documentContext.Snapshot;
SpellCheck\RemoteCSharpSpellCheckRangeProvider.cs (1)
23var snapshot = (RemoteDocumentSnapshot)documentContext.Snapshot;