71 references to DocumentState
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (26)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (22)
175
CommittedSolution.
DocumentState
initialState = CommittedSolution.
DocumentState
.MatchesBuildOutput,
189
if (initialState != CommittedSolution.
DocumentState
.None)
247
internal static void SetDocumentsState(DebuggingSession session, Solution solution, CommittedSolution.
DocumentState
state)
997
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1042
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1194
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1363
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None, sourceTextProvider);
1370
Assert.Equal(CommittedSolution.
DocumentState
.MatchesBuildOutput, state);
1582
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1685
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1729
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
2450
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None, sourceTextProvider);
2528
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
2556
Assert.Equal(CommittedSolution.
DocumentState
.OutOfSync, state);
2594
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
2661
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
3654
isOutOfSync ? CommittedSolution.
DocumentState
.OutOfSync : CommittedSolution.
DocumentState
.MatchesBuildOutput);
3900
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.OutOfSync);
3933
debuggingSession.LastCommittedSolution.Test_SetDocumentState(document.Id, CommittedSolution.
DocumentState
.MatchesBuildOutput);
4730
Assert.Equal(CommittedSolution.
DocumentState
.MatchesBuildOutput, state);
EditAndContinue\EditSessionActiveStatementsTests.cs (4)
41
CommittedSolution.
DocumentState
initialState = CommittedSolution.
DocumentState
.MatchesBuildOutput)
56
SpecializedCollections.EmptyEnumerable<KeyValuePair<DocumentId, CommittedSolution.
DocumentState
>>(),
59
if (initialState != CommittedSolution.
DocumentState
.None)
Microsoft.CodeAnalysis.Features (45)
EditAndContinue\CommittedSolution.cs (34)
80
/// that maches the PDB checksum are considered <see cref="
DocumentState
.OutOfSync"/>.
84
/// <see cref="
DocumentState
.DesignTimeOnly"/>.
86
/// A document state can only change from <see cref="
DocumentState
.OutOfSync"/> to <see cref="
DocumentState
.MatchesBuildOutput"/>.
87
/// Once a document state is <see cref="
DocumentState
.MatchesBuildOutput"/> or <see cref="
DocumentState
.DesignTimeOnly"/>
90
private readonly Dictionary<DocumentId,
DocumentState
> _documentState = new();
94
public CommittedSolution(DebuggingSession debuggingSession, Solution solution, IEnumerable<KeyValuePair<DocumentId,
DocumentState
>> initialDocumentStates)
102
internal void Test_SetDocumentState(DocumentId documentId,
DocumentState
state)
111
internal ImmutableArray<(DocumentId id,
DocumentState
state)> Test_GetDocumentStates()
141
public async Task<(Document? Document,
DocumentState
State)> GetDocumentAndStateAsync(DocumentId documentId, Document? currentDocument, CancellationToken cancellationToken, bool reloadOutOfSyncDocument = false)
146
var
documentState =
DocumentState
.None;
158
case
DocumentState
.MatchesBuildOutput:
163
case
DocumentState
.DesignTimeOnly:
166
case
DocumentState
.OutOfSync:
174
case
DocumentState
.Indeterminate:
178
case
DocumentState
.None:
187
return (sourceGeneratedDocument,
DocumentState
.MatchesBuildOutput);
193
return (null,
DocumentState
.MatchesBuildOutput);
206
return (null,
DocumentState
.None);
214
return (null,
DocumentState
.DesignTimeOnly);
219
return (null,
DocumentState
.DesignTimeOnly);
233
documentState !=
DocumentState
.OutOfSync &&
234
documentState !=
DocumentState
.Indeterminate)
239
DocumentState
newState;
245
return (document,
DocumentState
.Indeterminate);
254
newState = (committedDocument != null) ?
DocumentState
.DesignTimeOnly :
DocumentState
.MatchesBuildOutput;
259
return (document,
DocumentState
.Indeterminate);
296
newState =
DocumentState
.MatchesBuildOutput;
301
newState =
DocumentState
.OutOfSync;
348
internal static async Task<IEnumerable<KeyValuePair<DocumentId,
DocumentState
>>> GetMatchingDocumentsAsync(
405
return documentIdArrays.SelectMany(ids => ids.WhereNotNull()).Select(id => KeyValuePairUtil.Create(id,
DocumentState
.MatchesBuildOutput));
EditAndContinue\DebuggingSession.cs (4)
111
IEnumerable<KeyValuePair<DocumentId, CommittedSolution.
DocumentState
>> initialDocumentStates,
483
if (oldDocumentState is CommittedSolution.
DocumentState
.OutOfSync or
484
CommittedSolution.
DocumentState
.Indeterminate or
485
CommittedSolution.
DocumentState
.DesignTimeOnly)
EditAndContinue\EditAndContinueWorkspaceService.cs (2)
129
IEnumerable<KeyValuePair<DocumentId, CommittedSolution.
DocumentState
>> initialDocumentStates;
141
initialDocumentStates = SpecializedCollections.EmptyEnumerable<KeyValuePair<DocumentId, CommittedSolution.
DocumentState
>>();
EditAndContinue\EditSession.cs (5)
518
case CommittedSolution.
DocumentState
.DesignTimeOnly:
521
case CommittedSolution.
DocumentState
.Indeterminate:
522
case CommittedSolution.
DocumentState
.OutOfSync:
523
var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor((oldDocumentState == CommittedSolution.
DocumentState
.Indeterminate) ?
528
case CommittedSolution.
DocumentState
.MatchesBuildOutput: