70 references to DocumentState
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EditAndContinue\EditAndContinueLanguageServiceTests.cs (1)
397
Assert.Equal(CommittedSolution.
DocumentState
.MatchesBuildOutput, state);
Microsoft.CodeAnalysis.Features (43)
EditAndContinue\CommittedSolution.cs (34)
95
/// that maches the PDB checksum are considered <see cref="
DocumentState
.OutOfSync"/>.
99
/// <see cref="
DocumentState
.DesignTimeOnly"/>.
101
/// A document state can only change from <see cref="
DocumentState
.OutOfSync"/> to <see cref="
DocumentState
.MatchesBuildOutput"/>.
102
/// Once a document state is <see cref="
DocumentState
.MatchesBuildOutput"/> or <see cref="
DocumentState
.DesignTimeOnly"/>
107
private readonly Dictionary<DocumentId,
DocumentState
> _documentState = [];
111
public CommittedSolution(DebuggingSession debuggingSession, Solution solution, IEnumerable<KeyValuePair<DocumentId,
DocumentState
>> initialDocumentStates)
119
internal void Test_SetDocumentState(DocumentId documentId,
DocumentState
state)
128
internal ImmutableArray<(DocumentId id,
DocumentState
state)> Test_GetDocumentStates()
166
public async Task<(Document? Document,
DocumentState
State)> GetDocumentAndStateAsync(Document currentDocument, CancellationToken cancellationToken, bool reloadOutOfSyncDocument = false)
169
var
documentState =
DocumentState
.None;
182
case
DocumentState
.MatchesBuildOutput:
187
case
DocumentState
.DesignTimeOnly:
190
case
DocumentState
.OutOfSync:
198
case
DocumentState
.Indeterminate:
202
case
DocumentState
.None:
211
return (sourceGeneratedDocument,
DocumentState
.MatchesBuildOutput);
217
return (null,
DocumentState
.MatchesBuildOutput);
230
return (null,
DocumentState
.None);
238
return (null,
DocumentState
.DesignTimeOnly);
243
return (null,
DocumentState
.DesignTimeOnly);
257
documentState !=
DocumentState
.OutOfSync &&
258
documentState !=
DocumentState
.Indeterminate)
263
DocumentState
newState;
269
return (document,
DocumentState
.Indeterminate);
278
newState = (committedDocument != null) ?
DocumentState
.DesignTimeOnly :
DocumentState
.MatchesBuildOutput;
283
return (document,
DocumentState
.Indeterminate);
326
newState =
DocumentState
.MatchesBuildOutput;
331
newState =
DocumentState
.OutOfSync;
379
internal static async Task<IEnumerable<KeyValuePair<DocumentId,
DocumentState
>>> GetMatchingDocumentsAsync(
437
return documentIdArrays.SelectMany(ids => ids.WhereNotNull()).Select(id => KeyValuePair.Create(id,
DocumentState
.MatchesBuildOutput));
EditAndContinue\DebuggingSession.cs (4)
135
IEnumerable<KeyValuePair<DocumentId, CommittedSolution.
DocumentState
>> initialDocumentStates,
487
if (oldDocumentState is CommittedSolution.
DocumentState
.OutOfSync or
488
CommittedSolution.
DocumentState
.Indeterminate or
489
CommittedSolution.
DocumentState
.DesignTimeOnly)
EditAndContinue\EditAndContinueService.cs (1)
147
IEnumerable<KeyValuePair<DocumentId, CommittedSolution.
DocumentState
>> initialDocumentStates;
EditAndContinue\EditSession.cs (4)
565
case CommittedSolution.
DocumentState
.DesignTimeOnly:
568
case CommittedSolution.
DocumentState
.Indeterminate:
573
case CommittedSolution.
DocumentState
.OutOfSync:
579
case CommittedSolution.
DocumentState
.MatchesBuildOutput:
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
EditAndContinue\EditAndContinueTestVerifier.cs (1)
547
public static void SetDocumentsState(DebuggingSession session, Solution solution, CommittedSolution.
DocumentState
state)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (3)
171
CommittedSolution.
DocumentState
initialState = CommittedSolution.
DocumentState
.MatchesBuildOutput,
185
if (initialState != CommittedSolution.
DocumentState
.None)
Microsoft.CodeAnalysis.Features.UnitTests (22)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (19)
1019
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1065
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1285
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1447
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None, sourceTextProvider);
1454
Assert.Equal(CommittedSolution.
DocumentState
.MatchesBuildOutput, state);
1664
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1766
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1809
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
2763
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None, sourceTextProvider);
2838
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
2868
Assert.Equal(CommittedSolution.
DocumentState
.OutOfSync, state);
2909
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
2975
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4104
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4201
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4402
isOutOfSync ? CommittedSolution.
DocumentState
.OutOfSync : CommittedSolution.
DocumentState
.MatchesBuildOutput);
4620
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.OutOfSync);
4665
debuggingSession.LastCommittedSolution.Test_SetDocumentState(document.Id, CommittedSolution.
DocumentState
.MatchesBuildOutput);
EditAndContinue\EditSessionActiveStatementsTests.cs (3)
37
CommittedSolution.
DocumentState
initialState = CommittedSolution.
DocumentState
.MatchesBuildOutput)
59
if (initialState != CommittedSolution.
DocumentState
.None)