1 write to States
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\TextDocumentStates.cs (1)
62States = map;
47 references to States
Microsoft.CodeAnalysis.Workspaces (47)
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (1)
62regularDocumentStates.States.Select(kvp => (kvp.Key, kvp.Value)).Concat(
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
94var textChecksumsTasks = projectState.DocumentStates.States.Values.OrderBy(state => state.FilePath, StringComparer.Ordinal).Select(async state =>
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
304foreach (var (_, documentState) in projectState.DocumentStates.States)
Workspace\Solution\ChecksumCollection.cs (1)
76foreach (var (_, state) in documentStates.States)
Workspace\Solution\ProjectState.cs (5)
147foreach (var (documentId, documentState) in this.DocumentStates.States) 202foreach (var (_, state) in documentStates.States) 213foreach (var (_, state) in additionalDocumentStates.States) 260foreach (var (_, state) in documentStates.States) 268foreach (var (_, state) in additionalDocumentStates.States)
Workspace\Solution\SolutionCompilationState.CompilationTracker.CompilationTrackerState.cs (2)
103foreach (var generatedDocument in generatorInfo.Documents.States.Values) 203foreach (var generatedDocument in generatorInfo.Documents.States.Values)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (3)
822var syntaxTrees = generatorInfo.Documents.States.Values.Select(state => state.GetSyntaxTree(cancellationToken)); 959foreach (var documentInProjectState in projectState.DocumentStates.States) 968foreach (var generatedDocument in generatorInfo.Value.Documents.States)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (6)
41var generatedSyntaxTrees = await generatorInfo.Documents.States.Values.SelectAsArrayAsync( 144oldGeneratedDocuments.States.All(kvp => kvp.Value.ParseOptions.Equals(this.ProjectState.ParseOptions))) 223await newGeneratedDocuments.States.Values.SelectAsArrayAsync( 255foreach (var documentState in ProjectState.DocumentStates.States) 365await newGeneratedDocuments.States.Values.SelectAsArrayAsync( 377foreach (var (_, state) in states.States)
Workspace\Solution\SolutionCompilationState.WithFrozenSourceGeneratedDocumentsCompilationTracker.cs (2)
114foreach (var (id, replacementState) in _replacementDocumentStates.States) 180foreach (var (id, replacementState) in _replacementDocumentStates.States)
Workspace\Solution\TextDocumentStates.cs (25)
81=> new(ids, States, _filePathToDocumentIds); 84=> States.Count; 90=> States.ContainsKey(id); 93=> States.TryGetValue(documentId, out state); 96=> States.TryGetValue(documentId, out var state) ? state : null; 99=> States.TryGetValue(documentId, out var state) ? state : throw ExceptionUtilities.Unreachable(); 122var map = States; 133var result = new FixedSizeArrayBuilder<TValue>(States.Count); 134foreach (var (_, state) in States) 150States.AddRange(states.Select(state => KeyValuePairUtil.Create(state.Id, state))), 172return new(_ids.RemoveRange(enumerableIds), States.RemoveRange(enumerableIds), filePathToDocumentIds: null); 180var builder = States.ToBuilder(); 186var oldState = States[id]; 200var builder = States.ToBuilder(); 202foreach (var (id, state) in States) 234var newState = States[id]; 273=> !States.Values.SequenceEqual(oldStates.States.Values); 282=> States == other.States && _ids == other.Ids; 309var attributeChecksums = new FixedSizeArrayBuilder<Checksum>(States.Count); 310var textChecksums = new FixedSizeArrayBuilder<Checksum>(States.Count); 311var documentIds = new FixedSizeArrayBuilder<DocumentId>(States.Count); 313foreach (var (documentId, state) in States) 359foreach (var (documentId, state) in States)