38 references to PreserveValue
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
597
solution = solution.WithDocumentTextLoader(documentIdB, new WorkspaceFileTextLoader(solution.Services, sourceFileB.Path, encodingB), PreservationMode.
PreserveValue
);
Microsoft.CodeAnalysis.Features (1)
EditAndContinue\CommittedSolution.cs (1)
292
_solution = _solution.WithDocumentText(documentId, matchingSourceText, PreservationMode.
PreserveValue
);
Microsoft.CodeAnalysis.Workspaces (29)
Workspace\ProjectSystem\ProjectSystemProject.cs (3)
165
documentTextLoaderChangedAction: (s, d, loader) => s.WithDocumentTextLoader(d, loader, PreservationMode.
PreserveValue
),
172
documentTextLoaderChangedAction: (s, d, loader) => s.WithAdditionalDocumentTextLoader(d, loader, PreservationMode.
PreserveValue
),
179
documentTextLoaderChangedAction: (s, d, loader) => s.WithAnalyzerConfigDocumentTextLoader(d, loader, PreservationMode.
PreserveValue
),
Workspace\Solution\DocumentState.cs (1)
106
PreservationMode mode = PreservationMode.
PreserveValue
)
Workspace\Solution\PreservationMode.cs (1)
28
=> mode is >= PreservationMode.
PreserveValue
and <= PreservationMode.PreserveIdentity;
Workspace\Solution\Solution.cs (9)
1033
public Solution AddDocument(DocumentId documentId, string name, SyntaxNode syntaxRoot, IEnumerable<string>? folders = null, string? filePath = null, bool isGenerated = false, PreservationMode preservationMode = PreservationMode.
PreserveValue
)
1370
public Solution WithDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.
PreserveValue
)
1397
public Solution WithAdditionalDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.
PreserveValue
)
1424
public Solution WithAnalyzerConfigDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.
PreserveValue
)
1451
public Solution WithDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.
PreserveValue
)
1478
public Solution WithAdditionalDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.
PreserveValue
)
1505
public Solution WithAnalyzerConfigDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.
PreserveValue
)
1532
public Solution WithDocumentSyntaxRoot(DocumentId documentId, SyntaxNode root, PreservationMode mode = PreservationMode.
PreserveValue
)
1727
public Solution WithDocumentText(IEnumerable<DocumentId?> documentIds, SourceText text, PreservationMode mode = PreservationMode.
PreserveValue
)
Workspace\Solution\SolutionState.cs (7)
1259
public SolutionState WithDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.
PreserveValue
)
1274
public SolutionState WithAdditionalDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.
PreserveValue
)
1289
public SolutionState WithAnalyzerConfigDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.
PreserveValue
)
1304
public SolutionState WithDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.
PreserveValue
)
1319
public SolutionState WithAdditionalDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.
PreserveValue
)
1334
public SolutionState WithAnalyzerConfigDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.
PreserveValue
)
1349
public SolutionState WithDocumentSyntaxRoot(DocumentId documentId, SyntaxNode root, PreservationMode mode = PreservationMode.
PreserveValue
)
Workspace\Workspace.cs (5)
970
(solution, docId, loader) => solution.WithDocumentTextLoader(docId, loader, PreservationMode.
PreserveValue
),
984
(solution, docId, loader) => solution.WithAdditionalDocumentTextLoader(docId, loader, PreservationMode.
PreserveValue
),
998
(solution, docId, loader) => solution.WithAnalyzerConfigDocumentTextLoader(docId, loader, PreservationMode.
PreserveValue
),
1960
this.OnDocumentTextChanged(id, text, PreservationMode.
PreserveValue
);
2004
this.OnAdditionalDocumentTextChanged(id, text, PreservationMode.
PreserveValue
);
Workspace\Workspace_Editor.cs (3)
386
return oldSolution.WithDocumentText(documentId, newText, PreservationMode.
PreserveValue
);
592
return oldSolution.WithDocumentTextLoader(documentId, data.reloader, PreservationMode.
PreserveValue
);
663
return data.withTextDocumentTextLoader(oldSolution, documentId, data.reloader, PreservationMode.
PreserveValue
);
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildWorkspace.cs (2)
381
this.OnDocumentTextChanged(documentId, text, PreservationMode.
PreserveValue
);
399
this.OnAdditionalDocumentTextChanged(documentId, text, PreservationMode.
PreserveValue
);
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SolutionTests\SolutionTests.cs (3)
3056
var doc2 = doc.Project.Solution.WithDocumentSyntaxRoot(doc.Id, newRoot, PreservationMode.
PreserveValue
).GetDocument(doc.Id);
4024
PreservationMode.
PreserveValue
);
4348
static (s, documentId) => s.WithDocumentTextLoader(documentId, new TestTextLoader(Guid.NewGuid().ToString()), PreservationMode.
PreserveValue
), documentId).GetReference();
Microsoft.VisualStudio.LanguageServices (1)
Preview\TopLevelChange.cs (1)
177
solution = solution.WithTextDocumentText(updatedDocumentIdOpt, updateDocumentTextOpt, mode: PreservationMode.
PreserveValue
);
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
SolutionExplorer\SourceGeneratorItemTests.vb (1)
219
PreservationMode.
PreserveValue
)