70 references to DocumentState
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EditAndContinue\EditAndContinueLanguageServiceTests.cs (1)
405
Assert.Equal(CommittedSolution.
DocumentState
.MatchesBuildOutput, state);
Microsoft.CodeAnalysis.Features (43)
EditAndContinue\CommittedSolution.cs (34)
97
/// that maches the PDB checksum are considered <see cref="
DocumentState
.OutOfSync"/>.
101
/// <see cref="
DocumentState
.DesignTimeOnly"/>.
103
/// A document state can only change from <see cref="
DocumentState
.OutOfSync"/> to <see cref="
DocumentState
.MatchesBuildOutput"/>.
104
/// Once a document state is <see cref="
DocumentState
.MatchesBuildOutput"/> or <see cref="
DocumentState
.DesignTimeOnly"/>
109
private readonly Dictionary<DocumentId,
DocumentState
> _documentState = [];
113
public CommittedSolution(DebuggingSession debuggingSession, Solution solution, IEnumerable<KeyValuePair<DocumentId,
DocumentState
>> initialDocumentStates)
121
internal void Test_SetDocumentState(DocumentId documentId,
DocumentState
state)
130
internal ImmutableArray<(DocumentId id,
DocumentState
state)> Test_GetDocumentStates()
163
public async Task<(Document? Document,
DocumentState
State)> GetDocumentAndStateAsync(Document currentDocument, CancellationToken cancellationToken, bool reloadOutOfSyncDocument = false)
166
var
documentState =
DocumentState
.None;
179
case
DocumentState
.MatchesBuildOutput:
184
case
DocumentState
.DesignTimeOnly:
187
case
DocumentState
.OutOfSync:
195
case
DocumentState
.Indeterminate:
199
case
DocumentState
.None:
208
return (sourceGeneratedDocument,
DocumentState
.MatchesBuildOutput);
214
return (null,
DocumentState
.MatchesBuildOutput);
227
return (null,
DocumentState
.None);
235
return (null,
DocumentState
.DesignTimeOnly);
240
return (null,
DocumentState
.DesignTimeOnly);
254
documentState !=
DocumentState
.OutOfSync &&
255
documentState !=
DocumentState
.Indeterminate)
260
DocumentState
newState;
266
return (document,
DocumentState
.Indeterminate);
275
newState = (committedDocument != null) ?
DocumentState
.DesignTimeOnly :
DocumentState
.MatchesBuildOutput;
280
return (document,
DocumentState
.Indeterminate);
323
newState =
DocumentState
.MatchesBuildOutput;
328
newState =
DocumentState
.OutOfSync;
376
internal static async Task<IEnumerable<KeyValuePair<DocumentId,
DocumentState
>>> GetMatchingDocumentsAsync(
434
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)
624
case CommittedSolution.
DocumentState
.DesignTimeOnly:
627
case CommittedSolution.
DocumentState
.Indeterminate:
632
case CommittedSolution.
DocumentState
.OutOfSync:
638
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)
1110
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1157
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1378
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1541
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None, sourceTextProvider);
1548
Assert.Equal(CommittedSolution.
DocumentState
.MatchesBuildOutput, state);
1762
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1849
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1893
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
2974
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None, sourceTextProvider);
3049
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
3079
Assert.Equal(CommittedSolution.
DocumentState
.OutOfSync, state);
3120
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
3186
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4304
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4404
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4606
isOutOfSync ? CommittedSolution.
DocumentState
.OutOfSync : CommittedSolution.
DocumentState
.MatchesBuildOutput);
4824
var debuggingSession = await StartDebuggingSessionAsync(service, solution, initialState: CommittedSolution.
DocumentState
.OutOfSync);
4869
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)