1 write to _state
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\Solution.cs (1)
38_state = state;
141 references to _state
Microsoft.CodeAnalysis.Workspaces (141)
Workspace\Solution\Solution.cs (141)
46internal SolutionState State => _state; 48internal int WorkspaceVersion => _state.WorkspaceVersion; 50internal bool PartialSemanticsEnabled => _state.PartialSemanticsEnabled; 56public SolutionServices Services => _state.Services; 58internal string? WorkspaceKind => _state.WorkspaceKind; 60internal ProjectState? GetProjectState(ProjectId projectId) => _state.GetProjectState(projectId); 71return _state.Services.WorkspaceServices.Workspace; 79public SolutionId Id => _state.Id; 84public string? FilePath => _state.FilePath; 89public VersionStamp Version => _state.Version; 94public IReadOnlyList<ProjectId> ProjectIds => _state.ProjectIds; 104public VersionStamp GetLatestProjectVersion() => _state.GetLatestProjectVersion(); 109public bool ContainsProject([NotNullWhen(returnValue: true)] ProjectId? projectId) => _state.ContainsProject(projectId); 142var projectState = _state.GetProjectState(assemblySymbol); 168=> _state.GetOriginatingProjectId(symbol); 177public bool ContainsDocument([NotNullWhen(returnValue: true)] DocumentId? documentId) => _state.ContainsDocument(documentId); 182public bool ContainsAdditionalDocument([NotNullWhen(returnValue: true)] DocumentId? documentId) => _state.ContainsAdditionalDocument(documentId); 187public bool ContainsAnalyzerConfigDocument([NotNullWhen(returnValue: true)] DocumentId? documentId) => _state.ContainsAnalyzerConfigDocument(documentId); 329var newState = _state.AddProject(projectInfo); 330if (newState == _state) 343var newState = _state.RemoveProject(projectId); 344if (newState == _state) 365var newState = _state.WithProjectAssemblyName(projectId, assemblyName); 366if (newState == _state) 381var newState = _state.WithProjectOutputFilePath(projectId, outputFilePath); 382if (newState == _state) 397var newState = _state.WithProjectOutputRefFilePath(projectId, outputRefFilePath); 398if (newState == _state) 413var newState = _state.WithProjectCompilationOutputInfo(projectId, info); 414if (newState == _state) 429var newState = _state.WithProjectDefaultNamespace(projectId, defaultNamespace); 430if (newState == _state) 445var newState = _state.WithProjectChecksumAlgorithm(projectId, checksumAlgorithm); 446if (newState == _state) 466var newState = _state.WithProjectName(projectId, name); 467if (newState == _state) 482var newState = _state.WithProjectFilePath(projectId, filePath); 483if (newState == _state) 504var newState = _state.WithProjectCompilationOptions(projectId, options); 505if (newState == _state) 526var newState = _state.WithProjectParseOptions(projectId, options); 527if (newState == _state) 544var newState = _state.WithHasAllInformation(projectId, hasAllInformation); 545if (newState == _state) 562var newState = _state.WithRunAnalyzers(projectId, runAnalyzers); 563if (newState == _state) 589var newState = _state.WithProjectDocumentsOrder(projectId, documentIds); 590if (newState == _state) 634if (_state.ContainsProjectReference(projectId, projectReference)) 643var newState = _state.AddProjectReferences(projectId, collection); 644if (newState == _state) 668var newState = _state.RemoveProjectReference(projectId, projectReference); 669if (newState == _state) 697var newState = _state.WithProjectReferences(projectId, collection); 698if (newState == _state) 740if (_state.ContainsMetadataReference(projectId, metadataReference)) 746var newState = _state.AddMetadataReferences(projectId, collection); 747if (newState == _state) 772var newState = _state.RemoveMetadataReference(projectId, metadataReference); 773if (newState == _state) 793var newState = _state.WithProjectMetadataReferences( 797if (newState == _state) 843if (_state.ContainsAnalyzerReference(projectId, analyzerReference)) 849var newState = _state.AddAnalyzerReferences(projectId, collection); 850if (newState == _state) 875var newState = _state.RemoveAnalyzerReference(projectId, analyzerReference); 876if (newState == _state) 896var newState = _state.WithProjectAnalyzerReferences( 900if (newState == _state) 934if (_state.AnalyzerReferences.Contains(analyzerReference)) 940var newState = _state.AddAnalyzerReferences(collection); 941if (newState == _state) 962var newState = _state.RemoveAnalyzerReference(analyzerReference); 963if (newState == _state) 978var newState = _state.WithAnalyzerReferences( 981if (newState == _state) 1100var newState = _state.AddDocuments(documentInfos); 1101if (newState == _state) 1146var newState = _state.AddAdditionalDocuments(documentInfos); 1147if (newState == _state) 1199=> _state.GetProjectState(projectId) ?? throw new InvalidOperationException(string.Format(WorkspacesResources._0_is_not_part_of_the_workspace, projectId)); 1206var newState = _state.AddAnalyzerConfigDocuments(documentInfos); 1207if (newState == _state) 1235var newState = _state.RemoveDocuments(documentIds); 1236if (newState == _state) 1264var newState = _state.RemoveAdditionalDocuments(documentIds); 1265if (newState == _state) 1293var newState = _state.RemoveAnalyzerConfigDocuments(documentIds); 1294if (newState == _state) 1314var newState = _state.WithDocumentName(documentId, name); 1315if (newState == _state) 1331var newState = _state.WithDocumentFolders(documentId, 1334if (newState == _state) 1357var newState = _state.WithDocumentFilePath(documentId, filePath); 1358if (newState == _state) 1384var newState = _state.WithDocumentText(documentId, text, mode); 1385if (newState == _state) 1411var newState = _state.WithAdditionalDocumentText(documentId, text, mode); 1412if (newState == _state) 1438var newState = _state.WithAnalyzerConfigDocumentText(documentId, text, mode); 1439if (newState == _state) 1465var newState = _state.WithDocumentText(documentId, textAndVersion, mode); 1466if (newState == _state) 1492var newState = _state.WithAdditionalDocumentText(documentId, textAndVersion, mode); 1493if (newState == _state) 1519var newState = _state.WithAnalyzerConfigDocumentText(documentId, textAndVersion, mode); 1520if (newState == _state) 1546var newState = _state.WithDocumentSyntaxRoot(documentId, root, mode); 1547if (newState == _state) 1557var newState = _state.WithDocumentContentsFrom(documentId, documentState); 1558return newState == _state ? this : new Solution(newState); 1581var newState = _state.WithDocumentSourceCodeKind(documentId, sourceCodeKind); 1582if (newState == _state) 1608var newState = _state.UpdateDocumentTextLoader(documentId, loader, mode); 1612Debug.Assert(newState != _state); 1635var newState = _state.UpdateAdditionalDocumentTextLoader(documentId, loader, mode); 1639Debug.Assert(newState != _state); 1662var newState = _state.UpdateAnalyzerConfigDocumentTextLoader(documentId, loader, mode); 1666Debug.Assert(newState != _state); 1681var newState = _state.WithFrozenPartialCompilationIncludingSpecificDocument(documentId, cancellationToken); 1699return _state.GetRelatedDocumentIds(documentId); 1704var newState = _state.WithNewWorkspace(workspaceKind, workspaceVersion, services); 1705if (newState == _state) 1744var newState = _state.WithDocumentText(documentIds, text, mode); 1745if (newState == _state) 1760var newState = _state.WithFrozenSourceGeneratedDocument(documentIdentity, text); 1761var newSolution = newState != _state ? new Solution(newState) : this; 1774var newState = _state.WithoutFrozenSourceGeneratedDocuments(); 1775if (newState == _state) 1793var newState = _state.WithCachedSourceGeneratorState(projectToUpdate, projectWithCachedGeneratorState); 1794if (newState == _state) 1820public ImmutableArray<DocumentId> GetDocumentIdsWithFilePath(string? filePath) => _state.GetDocumentIdsWithFilePath(filePath); 1825public ProjectDependencyGraph GetProjectDependencyGraph() => _state.GetProjectDependencyGraph(); 1831public OptionSet Options => _state.Options; 1836public IReadOnlyList<AnalyzerReference> AnalyzerReferences => _state.AnalyzerReferences; 1856var newState = _state.WithOptions(options: options); 1857if (newState == _state) 1969if (_state.ContainsTransitiveReference(projectReference.ProjectId, projectId)) 1987var projectState = _state.GetRequiredProjectState(projectId); 1990var hasSubmissionReference = !ignoreExistingReferences && projectState.ProjectReferences.Any(p => _state.GetRequiredProjectState(p.ProjectId).IsSubmission); 1995var referencedProjectState = _state.GetProjectState(projectReference.ProjectId);