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