32 references to Snapshot
Microsoft.CodeAnalysis.Razor.Workspaces (29)
CodeActions\CSharp\UnformattedRemappingCSharpCodeActionResolver.cs (1)
57
var codeDocument = await documentContext.
Snapshot
.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false);
CodeActions\Html\HtmlCodeActionResolver.cs (1)
23
await HtmlCodeActionProvider.MapAndFixHtmlCodeActionEditAsync(_razorEditService, documentContext.
Snapshot
, codeAction, cancellationToken).ConfigureAwait(false);
CodeActions\Razor\AddUsingsCodeActionResolver.cs (1)
29
var documentSnapshot = documentContext.
Snapshot
;
CodeActions\Razor\CreateComponentCodeActionResolver.cs (1)
36
if (!documentContext.
Snapshot
.FileKind.IsComponent())
CodeActions\Razor\ExtractToCodeBehindCodeActionResolver.cs (1)
52
codeBehindContent = await _roslynCodeActionHelpers.GetFormattedNewFileContentsAsync(documentContext.
Snapshot
.Project, codeBehindUri, codeBehindContent, cancellationToken).ConfigureAwait(false);
CodeActions\Razor\GenerateEventHandlerCodeActionResolver.cs (1)
92
var csharpSyntaxTree = await documentContext.
Snapshot
.GetCSharpSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
CodeActions\Razor\PromoteUsingCodeActionResolver.cs (1)
37
var importsFileName = PromoteUsingCodeActionProvider.GetImportsFileName(documentContext.
Snapshot
.FileKind);
DocumentMapping\RazorEditService_WorkspaceEdit.cs (1)
150
var mappedEdits = await MapCSharpEditsAsync(textChanges, documentContext.
Snapshot
, includeCSharpLanguageFeatureEdits: true, cancellationToken).ConfigureAwait(false);
Formatting\RazorFormattingService.cs (15)
70
var codeDocument = await documentContext.
Snapshot
.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false);
95
var logger = _formattingLoggerFactory.CreateLogger(documentContext.
Snapshot
.FilePath, range is null ? "Full" : "Range");
96
logger?.LogObject("FileKind", documentContext.
Snapshot
.FileKind);
104
var documentSnapshot = documentContext.
Snapshot
;
105
var hostDocumentVersion = documentContext.
Snapshot
.Version;
140
var documentSnapshot = documentContext.
Snapshot
;
142
var codeDocument = await documentContext.
Snapshot
.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false);
161
var documentSnapshot = documentContext.
Snapshot
;
164
var codeDocument = await documentContext.
Snapshot
.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false);
183
var documentSnapshot = documentContext.
Snapshot
;
185
var codeDocument = await documentContext.
Snapshot
.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false);
208
var documentSnapshot = documentContext.
Snapshot
;
210
var codeDocument = await documentContext.
Snapshot
.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false);
235
var documentSnapshot = documentContext.
Snapshot
;
237
var codeDocument = await documentContext.
Snapshot
.GetGeneratedOutputAsync(cancellationToken).ConfigureAwait(false);
ProjectSystem\DocumentContext.cs (2)
36
var codeDocument = await
Snapshot
55
var sourceText = await
Snapshot
.GetTextAsync(cancellationToken).ConfigureAwait(false);
Rename\RenameService.cs (2)
40
if (!documentContext.
Snapshot
.FileKind.IsComponent())
96
var 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)
13
public new RemoteDocumentSnapshot Snapshot => (RemoteDocumentSnapshot)base.
Snapshot
;
SemanticTokens\RemoteCSharpSemanticTokensProvider.cs (1)
38
var snapshot = (RemoteDocumentSnapshot)documentContext.
Snapshot
;
SpellCheck\RemoteCSharpSpellCheckRangeProvider.cs (1)
23
var snapshot = (RemoteDocumentSnapshot)documentContext.
Snapshot
;