65 references to DocumentState
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EditAndContinue\EditAndContinueLanguageServiceTests.cs (1)
411
Assert.Equal(CommittedSolution.
DocumentState
.MatchesBuildOutput, state);
Microsoft.CodeAnalysis.Features (38)
EditAndContinue\CommittedSolution.cs (31)
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 = [];
112
internal void Test_SetDocumentState(DocumentId documentId,
DocumentState
state)
121
internal ImmutableArray<(DocumentId id,
DocumentState
state)> Test_GetDocumentStates()
151
public async Task<(Document? Document,
DocumentState
State)> GetDocumentAndStateAsync(Document currentDocument, CancellationToken cancellationToken, bool reloadOutOfSyncDocument = false)
154
var
documentState =
DocumentState
.None;
167
case
DocumentState
.MatchesBuildOutput:
172
case
DocumentState
.DesignTimeOnly:
175
case
DocumentState
.OutOfSync:
183
case
DocumentState
.Indeterminate:
187
case
DocumentState
.None:
196
return (sourceGeneratedDocument,
DocumentState
.MatchesBuildOutput);
202
return (null,
DocumentState
.MatchesBuildOutput);
215
return (null,
DocumentState
.None);
223
return (null,
DocumentState
.DesignTimeOnly);
228
return (null,
DocumentState
.DesignTimeOnly);
242
documentState !=
DocumentState
.OutOfSync &&
243
documentState !=
DocumentState
.Indeterminate)
248
DocumentState
newState;
254
return (document,
DocumentState
.Indeterminate);
263
newState = (committedDocument != null) ?
DocumentState
.DesignTimeOnly :
DocumentState
.MatchesBuildOutput;
268
return (document,
DocumentState
.Indeterminate);
311
newState =
DocumentState
.MatchesBuildOutput;
316
newState =
DocumentState
.OutOfSync;
EditAndContinue\DebuggingSession.cs (3)
486
if (oldDocumentState is CommittedSolution.
DocumentState
.OutOfSync or
487
CommittedSolution.
DocumentState
.Indeterminate or
488
CommittedSolution.
DocumentState
.DesignTimeOnly)
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)
582
public static void SetDocumentsState(DebuggingSession session, Solution solution, CommittedSolution.
DocumentState
state)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (3)
172
CommittedSolution.
DocumentState
initialState = CommittedSolution.
DocumentState
.MatchesBuildOutput,
183
if (initialState != CommittedSolution.
DocumentState
.None)
Microsoft.CodeAnalysis.Features.UnitTests (22)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (19)
1110
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1157
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1378
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1575
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None, sourceTextProvider);
1583
Assert.Equal(CommittedSolution.
DocumentState
.MatchesBuildOutput, state);
1820
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1907
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1951
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
3093
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None, sourceTextProvider);
3168
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
3198
Assert.Equal(CommittedSolution.
DocumentState
.OutOfSync, state);
3246
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
3312
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4430
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4530
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4738
isOutOfSync ? CommittedSolution.
DocumentState
.OutOfSync : CommittedSolution.
DocumentState
.MatchesBuildOutput);
4956
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.OutOfSync);
5001
debuggingSession.LastCommittedSolution.Test_SetDocumentState(document.Id, CommittedSolution.
DocumentState
.MatchesBuildOutput);
EditAndContinue\EditSessionActiveStatementsTests.cs (3)
37
CommittedSolution.
DocumentState
initialState = CommittedSolution.
DocumentState
.MatchesBuildOutput)
58
if (initialState != CommittedSolution.
DocumentState
.None)