11 references to TryGetState
Microsoft.CodeAnalysis.Workspaces (11)
Workspace\Solution\Project.cs (3)
497(documentId, project) => project.State.DocumentStates.TryGetState(documentId, out var state) ? new Document(project, state) : null; 500(documentId, project) => project.State.AdditionalDocumentStates.TryGetState(documentId, out var state) ? new AdditionalDocument(project, state) : null; 503(documentId, project) => project.State.AnalyzerConfigDocumentStates.TryGetState(documentId, out var state) ? new AnalyzerConfigDocument(project, state) : null;
Workspace\Solution\ProjectState.cs (2)
399if (documentId != null && projectState.DocumentStates.TryGetState(documentId, out var documentState)) 471if (documentId != null && projectState.DocumentStates.TryGetState(documentId, out var documentState))
Workspace\Solution\SolutionCompilationState.cs (1)
625if (oldDocumentStates.TryGetState(newDocumentInfo.Id, out var oldDocumentState))
Workspace\Solution\SolutionCompilationState.WithFrozenSourceGeneratedDocumentsCompilationTracker.cs (2)
126underlyingSourceGeneratedDocuments.TryGetState(id, out var existingState); 204if (_replacementDocumentStates.TryGetState(documentId, out var replacementState))
Workspace\Solution\StateChecksums.cs (2)
147Contract.ThrowIfFalse(compilationState.FrozenSourceGeneratedDocumentStates.TryGetState(documentId, out var state)); 161Contract.ThrowIfFalse(compilationState.FrozenSourceGeneratedDocumentStates.TryGetState(id, out var state));
Workspace\Solution\TextDocumentStates.cs (1)
230if (!oldStates.TryGetState(id, out var oldState))