11 instantiations of TextDocumentStates
Microsoft.CodeAnalysis.Workspaces (11)
Workspace\Solution\ProjectState.cs (3)
106AnalyzerConfigDocumentStates = new TextDocumentStates<AnalyzerConfigDocumentState>(projectInfoFixed.AnalyzerConfigDocuments, info => new AnalyzerConfigDocumentState(languageServices.SolutionServices, info, loadTextOptions)); 120DocumentStates = new TextDocumentStates<DocumentState>(projectInfoFixed.Documents, info => CreateDocument(info, parseOptions, loadTextOptions)); 121AdditionalDocumentStates = 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)
81=> new(ids, States, _filePathToDocumentIds); 148return new( 172return new(_ids.RemoveRange(enumerableIds), States.RemoveRange(enumerableIds), filePathToDocumentIds: null); 195return new(_ids, builder.ToImmutable(), filePathToDocumentIds); 216return 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)
35public readonly TextDocumentStates<DocumentState> DocumentStates; 41public readonly TextDocumentStates<AdditionalDocumentState> AdditionalDocumentStates; 47public readonly TextDocumentStates<AnalyzerConfigDocumentState> AnalyzerConfigDocumentStates; 71TextDocumentStates<DocumentState> documentStates, 72TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, 73TextDocumentStates<AnalyzerConfigDocumentState> analyzerConfigDocumentStates, 136public TextDocumentStates<TDocumentState> GetDocumentStates<TDocumentState>() 138=> (TextDocumentStates<TDocumentState>)(object)( 198private static async Task<VersionStamp> ComputeLatestDocumentVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken) 226TextDocumentStates<DocumentState> newDocumentStates, 227TextDocumentStates<AdditionalDocumentState> newAdditionalDocumentStates) 256private static async Task<VersionStamp> ComputeLatestDocumentTopLevelChangeVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken) 683TextDocumentStates<DocumentState>? documentStates = null, 684TextDocumentStates<AdditionalDocumentState>? additionalDocumentStates = null, 685TextDocumentStates<AnalyzerConfigDocumentState>? analyzerConfigDocumentStates = null, 757private TextDocumentStates<DocumentState> UpdateDocumentsChecksumAlgorithm(SourceHashAlgorithm checksumAlgorithm) 895private ProjectState CreateNewStateForChangedAnalyzerConfig(TextDocumentStates<AnalyzerConfigDocumentState> newAnalyzerConfigDocumentStates, StructuredAnalyzerConfigOptions fallbackOptions) 956documentStates: TextDocumentStates<DocumentState>.Empty, 1034TextDocumentStates<DocumentState> newDocumentStates, 1035TextDocumentStates<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); 1686var 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 = 80public TextDocumentStates<TState> WithCompilationOrder(ImmutableList<DocumentId> ids) 140public TextDocumentStates<TState> AddRange(ImmutableArray<TState> states) 154public TextDocumentStates<TState> RemoveRange(ImmutableArray<DocumentId> ids) 175internal TextDocumentStates<TState> SetState(TState state) 178internal TextDocumentStates<TState> SetStates(ImmutableArray<TState> states) 198public TextDocumentStates<TState> UpdateStates<TArg>(Func<TState, TArg, TState> transformation, TArg arg) 222public IEnumerable<DocumentId> GetChangedStateIds(TextDocumentStates<TState> oldStates, bool ignoreUnchangedContent = false, bool ignoreUnchangeableDocuments = false) 252public IEnumerable<DocumentId> GetAddedStateIds(TextDocumentStates<TState> oldStates) 258public IEnumerable<DocumentId> GetRemovedStateIds(TextDocumentStates<TState> oldStates) 272public bool HasAnyStateChanges(TextDocumentStates<TState> oldStates) 276=> obj is TextDocumentStates<TState> other && Equals(other); 281public bool Equals(TextDocumentStates<TState> other)