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