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