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)
573
public static void SetDocumentsState(DebuggingSession session, Solution solution, CommittedSolution.
DocumentState
state)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (3)
171
CommittedSolution.
DocumentState
initialState = CommittedSolution.
DocumentState
.MatchesBuildOutput,
182
if (initialState != CommittedSolution.
DocumentState
.None)
Microsoft.CodeAnalysis.Features.UnitTests (22)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (19)
1103
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1150
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1371
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1534
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None, sourceTextProvider);
1541
Assert.Equal(CommittedSolution.
DocumentState
.MatchesBuildOutput, state);
1755
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1842
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
1886
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
2967
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None, sourceTextProvider);
3042
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
3072
Assert.Equal(CommittedSolution.
DocumentState
.OutOfSync, state);
3113
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
3179
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4297
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4397
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.None);
4599
isOutOfSync ? CommittedSolution.
DocumentState
.OutOfSync : CommittedSolution.
DocumentState
.MatchesBuildOutput);
4817
var debuggingSession = StartDebuggingSession(service, solution, initialState: CommittedSolution.
DocumentState
.OutOfSync);
4862
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)