11 instantiations of TextDocumentStates
Microsoft.CodeAnalysis.Workspaces (11)
Workspace\Solution\ProjectState.cs (3)
102AnalyzerConfigDocumentStates = new TextDocumentStates<AnalyzerConfigDocumentState>(projectInfoFixed.AnalyzerConfigDocuments, info => new AnalyzerConfigDocumentState(languageServices.SolutionServices, info, loadTextOptions)); 116DocumentStates = new TextDocumentStates<DocumentState>(projectInfoFixed.Documents, info => CreateDocument(info, parseOptions, loadTextOptions)); 117AdditionalDocumentStates = new TextDocumentStates<AdditionalDocumentState>(projectInfoFixed.AdditionalDocuments, info => new AdditionalDocumentState(languageServices.SolutionServices, info, loadTextOptions));
Workspace\Solution\SolutionCompilationState.cs (1)
1390frozenSourceGeneratedDocumentStates: new TextDocumentStates<SourceGeneratedDocumentState>(documentStates));
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (2)
221var newGeneratedDocuments = new TextDocumentStates<SourceGeneratedDocumentState>(generatedDocumentsBuilder.ToImmutableAndClear()); 363var newGeneratedDocuments = new TextDocumentStates<SourceGeneratedDocumentState>(generatedDocumentsBuilder.ToImmutableAndClear());
Workspace\Solution\TextDocumentStates.cs (5)
82=> new(ids, States, _filePathToDocumentIds); 151return new( 175return new(_ids.RemoveRange(enumerableIds), States.RemoveRange(enumerableIds), filePathToDocumentIds: null); 198return new(_ids, builder.ToImmutable(), filePathToDocumentIds); 219return new(_ids, builder.ToImmutable(), filePaths);
67 references to TextDocumentStates
Microsoft.CodeAnalysis.Workspaces (67)
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (1)
58var regularDocumentStates = project.State.DocumentStates;
Workspace\Solution\ChecksumCollection.cs (1)
58TextDocumentStates<TState> documentStates,
Workspace\Solution\ProjectState.AnalyzerConfigOptionsCache.cs (1)
22private readonly struct AnalyzerConfigOptionsCache(TextDocumentStates<AnalyzerConfigDocumentState> analyzerConfigDocumentStates, StructuredAnalyzerConfigOptions fallbackOptions)
Workspace\Solution\ProjectState.cs (22)
33public readonly TextDocumentStates<DocumentState> DocumentStates; 39public readonly TextDocumentStates<AdditionalDocumentState> AdditionalDocumentStates; 45public readonly TextDocumentStates<AnalyzerConfigDocumentState> AnalyzerConfigDocumentStates; 70TextDocumentStates<DocumentState> documentStates, 71TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, 72TextDocumentStates<AnalyzerConfigDocumentState> analyzerConfigDocumentStates, 129public TextDocumentStates<TDocumentState> GetDocumentStates<TDocumentState>() 131=> (TextDocumentStates<TDocumentState>)(object)( 223private static async Task<VersionStamp> ComputeLatestDocumentVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken) 251TextDocumentStates<DocumentState> newDocumentStates, 252TextDocumentStates<AdditionalDocumentState> newAdditionalDocumentStates) 281private static async Task<VersionStamp> ComputeLatestDocumentTopLevelChangeVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken) 708TextDocumentStates<DocumentState>? documentStates = null, 709TextDocumentStates<AdditionalDocumentState>? additionalDocumentStates = null, 710TextDocumentStates<AnalyzerConfigDocumentState>? analyzerConfigDocumentStates = null, 782private TextDocumentStates<DocumentState> UpdateDocumentsChecksumAlgorithm(SourceHashAlgorithm checksumAlgorithm) 920private ProjectState CreateNewStateForChangedAnalyzerConfig(TextDocumentStates<AnalyzerConfigDocumentState> newAnalyzerConfigDocumentStates, StructuredAnalyzerConfigOptions fallbackOptions) 981documentStates: TextDocumentStates<DocumentState>.Empty, 1059TextDocumentStates<DocumentState> newDocumentStates, 1060TextDocumentStates<AdditionalDocumentState> newAdditionalDocumentStates,
Workspace\Solution\SolutionCompilationState.CompilationTrackerGeneratorInfo.cs (2)
20TextDocumentStates<SourceGeneratedDocumentState> Documents, 24new(TextDocumentStates<SourceGeneratedDocumentState>.Empty, Driver: null);
Workspace\Solution\SolutionCompilationState.cs (10)
44public TextDocumentStates<SourceGeneratedDocumentState>? FrozenSourceGeneratedDocumentStates { get; } 64TextDocumentStates<SourceGeneratedDocumentState>? frozenSourceGeneratedDocumentStates, 119Optional<TextDocumentStates<SourceGeneratedDocumentState>?> frozenSourceGeneratedDocumentStates = default, 124var newFrozenSourceGeneratedDocumentStates = frozenSourceGeneratedDocumentStates.HasValue ? frozenSourceGeneratedDocumentStates.Value : FrozenSourceGeneratedDocumentStates; 621var oldDocumentStates = oldProjectState.GetDocumentStates<TDocumentState>(); 808var oldDocumentStates = oldProjectState.GetDocumentStates<TDocumentState>(); 1166public ValueTask<TextDocumentStates<SourceGeneratedDocumentState>> GetSourceGeneratedDocumentStatesAsync(ProjectState project, CancellationToken cancellationToken) 1170public ValueTask<TextDocumentStates<SourceGeneratedDocumentState>> GetSourceGeneratedDocumentStatesAsync( 1175: new(TextDocumentStates<SourceGeneratedDocumentState>.Empty); 1709var oldDocumentStates = oldProjectState.GetDocumentStates<T>();
Workspace\Solution\SolutionCompilationState.ICompilationTracker.cs (1)
66ValueTask<TextDocumentStates<SourceGeneratedDocumentState>> GetSourceGeneratedDocumentStatesAsync(
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (2)
842public async ValueTask<TextDocumentStates<SourceGeneratedDocumentState>> GetSourceGeneratedDocumentStatesAsync( 851return TextDocumentStates<SourceGeneratedDocumentState>.Empty;
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (9)
75private async Task<(Compilation compilationWithGeneratedFiles, TextDocumentStates<SourceGeneratedDocumentState> generatedDocuments)?> TryComputeNewGeneratorInfoInRemoteProcessAsync( 78TextDocumentStates<SourceGeneratedDocumentState> oldGeneratedDocuments, 113return (compilationWithoutGeneratedFiles, TextDocumentStates<SourceGeneratedDocumentState>.Empty); 221var newGeneratedDocuments = new TextDocumentStates<SourceGeneratedDocumentState>(generatedDocumentsBuilder.ToImmutableAndClear()); 228private async Task<(Compilation compilationWithGeneratedFiles, TextDocumentStates<SourceGeneratedDocumentState> generatedDocuments, GeneratorDriver? generatorDriver)> ComputeNewGeneratorInfoInCurrentProcessAsync( 231TextDocumentStates<SourceGeneratedDocumentState> oldGeneratedDocuments, 238return (compilationWithoutGeneratedFiles, TextDocumentStates<SourceGeneratedDocumentState>.Empty, generatorDriver); 363var newGeneratedDocuments = new TextDocumentStates<SourceGeneratedDocumentState>(generatedDocumentsBuilder.ToImmutableAndClear()); 370TextDocumentStates<SourceGeneratedDocumentState> states,
Workspace\Solution\SolutionCompilationState.WithFrozenSourceGeneratedDocumentsCompilationTracker.cs (5)
29private readonly TextDocumentStates<SourceGeneratedDocumentState> _replacementDocumentStates; 52TextDocumentStates<SourceGeneratedDocumentState> replacementDocumentStates) 110var underlyingSourceGeneratedDocuments = await UnderlyingTracker.GetSourceGeneratedDocumentStatesAsync( 170public async ValueTask<TextDocumentStates<SourceGeneratedDocumentState>> GetSourceGeneratedDocumentStatesAsync( 173var newStates = await UnderlyingTracker.GetSourceGeneratedDocumentStatesAsync(
Workspace\Solution\TextDocumentStates.cs (13)
42public static readonly TextDocumentStates<TState> Empty = 81public TextDocumentStates<TState> WithCompilationOrder(ImmutableList<DocumentId> ids) 143public TextDocumentStates<TState> AddRange(ImmutableArray<TState> states) 157public TextDocumentStates<TState> RemoveRange(ImmutableArray<DocumentId> ids) 178internal TextDocumentStates<TState> SetState(TState state) 181internal TextDocumentStates<TState> SetStates(ImmutableArray<TState> states) 201public TextDocumentStates<TState> UpdateStates<TArg>(Func<TState, TArg, TState> transformation, TArg arg) 225public IEnumerable<DocumentId> GetChangedStateIds(TextDocumentStates<TState> oldStates, bool ignoreUnchangedContent = false, bool ignoreUnchangeableDocuments = false) 255public IEnumerable<DocumentId> GetAddedStateIds(TextDocumentStates<TState> oldStates) 261public IEnumerable<DocumentId> GetRemovedStateIds(TextDocumentStates<TState> oldStates) 275public bool HasAnyStateChanges(TextDocumentStates<TState> oldStates) 279=> obj is TextDocumentStates<TState> other && Equals(other); 284public bool Equals(TextDocumentStates<TState> other)