1 write to State
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\TextDocument.cs (1)
30
State
= state;
54 references to State
Microsoft.CodeAnalysis.Features (14)
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.cs (1)
254
if (document.
State
.Attributes.IsGenerated)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
532
Contract.ThrowIfFalse(newDocument == null || newDocument.
State
.SupportsEditAndContinue());
533
Contract.ThrowIfFalse(oldDocument == null || oldDocument.
State
.SupportsEditAndContinue());
EditAndContinue\CommittedSolution.cs (3)
293
isGenerated: document.
State
.Attributes.IsGenerated)
294
.WithDesignTimeOnly(document.
State
.Attributes.DesignTimeOnly)
295
.WithDocumentServiceProvider(document.
State
.DocumentServiceProvider));
EditAndContinue\DebuggingSession.cs (2)
710
if (document?.
State
.SupportsEditAndContinue() != true)
850
if (_isDisposed || !EditSession.InBreakState || !mappedDocument.
State
.SupportsEditAndContinue() || !mappedDocument.Project.SupportsEditAndContinue())
EditAndContinue\EditSession.cs (3)
351
if (document.
State
.IgnoreForEditAndContinue())
372
if (document.
State
.IgnoreForEditAndContinue())
388
if (document.
State
.IgnoreForEditAndContinue())
EditAndContinue\PdbMatchingSourceTextProvider.cs (3)
84
if (!oldDocument.
State
.SupportsEditAndContinue())
93
if (oldDocument.
State
.TextAndVersionSource.CanReloadText && !newDocument.
State
.TextAndVersionSource.CanReloadText)
Microsoft.CodeAnalysis.Workspaces (40)
Classification\SemanticClassificationCacheUtilities.cs (1)
29
var checksums = await document.
State
.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
Diagnostics\FileContentLoadAnalyzer.cs (1)
31
var exceptionMessage = await textDocument.
State
.GetFailedToLoadExceptionMessageAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (1)
149
(DocumentState)document.
State
,
FindSymbols\SyntaxTree\SyntaxTreeIndex.cs (3)
39
=> GetRequiredIndexAsync(SolutionKey.ToSolutionKey(document.Project.Solution), document.Project.State, (DocumentState)document.
State
, cancellationToken);
45
=> GetIndexAsync(SolutionKey.ToSolutionKey(document.Project.Solution), document.Project.State, (DocumentState)document.
State
, cancellationToken);
51
=> GetIndexAsync(SolutionKey.ToSolutionKey(document.Project.Solution), document.Project.State, (DocumentState)document.
State
, loadOnly, cancellationToken);
FindSymbols\TopLevelSyntaxTree\NavigateToSearchIndex.cs (3)
47
=> GetRequiredIndexAsync(SolutionKey.ToSolutionKey(document.Project.Solution), document.Project.State, (DocumentState)document.
State
, cancellationToken);
53
=> GetIndexAsync(SolutionKey.ToSolutionKey(document.Project.Solution), document.Project.State, (DocumentState)document.
State
, cancellationToken);
59
=> GetIndexAsync(SolutionKey.ToSolutionKey(document.Project.Solution), document.Project.State, (DocumentState)document.
State
, loadOnly, cancellationToken);
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex.cs (3)
47
=> GetRequiredIndexAsync(SolutionKey.ToSolutionKey(document.Project.Solution), document.Project.State, (DocumentState)document.
State
, cancellationToken);
53
=> GetIndexAsync(SolutionKey.ToSolutionKey(document.Project.Solution), document.Project.State, (DocumentState)document.
State
, cancellationToken);
59
=> GetIndexAsync(SolutionKey.ToSolutionKey(document.Project.Solution), document.Project.State, (DocumentState)document.
State
, loadOnly, cancellationToken);
Log\WorkspaceStructureLogger.cs (1)
307
var loadDiagnostic = await document.
State
.GetFailedToLoadExceptionMessageAsync(cancellationToken).ConfigureAwait(false);
Workspace\Host\DocumentService\Extensions.cs (3)
14
=> document?.
State
.CanApplyChange() ?? false;
20
=> document?.
State
.SupportsDiagnostics() ?? false;
26
=> IsRazorDocument(document.
State
);
Workspace\Host\PersistentStorage\DocumentKey.cs (1)
34
=> ToDocumentKey(ProjectKey.ToProjectKey(document.Project), document.
State
);
Workspace\Solution\Document.cs (1)
50
internal DocumentState DocumentState => (DocumentState)
State
;
Workspace\Solution\SourceGeneratedDocument.cs (1)
21
private new SourceGeneratedDocumentState State => (SourceGeneratedDocumentState)base.
State
;
Workspace\Solution\TextDocument.cs (16)
38
public DocumentId Id =>
State
.Id;
43
public string? FilePath =>
State
.FilePath;
48
public string Name =>
State
.Name;
53
public IReadOnlyList<string> Folders =>
State
.Folders;
58
internal IDocumentServiceProvider DocumentServiceProvider =>
State
.DocumentServiceProvider;
64
=>
State
.TryGetText(out text);
70
=>
State
.TryGetTextVersion(out version);
79
=>
State
.GetTextAsync(cancellationToken);
87
=>
State
.GetTextSynchronously(cancellationToken);
93
=> await
State
.GetTextVersionAsync(cancellationToken).ConfigureAwait(false);
101
=>
State
.GetTextVersionSynchronously(cancellationToken);
107
=>
State
.GetTopLevelChangeTextVersionAsync(cancellationToken);
113
=>
State
.HasInfoChanged(otherTextDocument.
State
);
119
=>
State
.HasTextChanged(otherTextDocument.
State
, ignoreUnchangeableDocument);
Workspace\Workspace.cs (4)
1108
var oldAttributes = oldSolution.GetDocument(documentId)!.
State
.Attributes;
1644
new DocumentInfo(newDoc.DocumentState.Attributes, loader: null, documentServiceProvider: newDoc.
State
.DocumentServiceProvider));
2048
isGenerated: doc.
State
.Attributes.IsGenerated)
2049
.WithDesignTimeOnly(doc.
State
.Attributes.DesignTimeOnly)
Workspace\Workspace_Editor.cs (1)
394
var oldDocumentState = oldDocument.
State
;