42 references to PreserveValue
Microsoft.CodeAnalysis.Features (1)
EditAndContinue\CommittedSolution.cs (1)
291_solution = _solution.WithDocumentText(documentId, matchingSourceText, PreservationMode.PreserveValue);
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
150solution = solution.WithDocumentTextLoader(documentIdB, new WorkspaceFileTextLoader(solution.Services, sourceFileB.Path, encodingB), PreservationMode.PreserveValue);
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\RemoteWorkspace.SolutionCreator.cs (1)
558var mode = PreservationMode.PreserveValue;
Microsoft.CodeAnalysis.Workspaces (32)
Workspace\ProjectSystem\ProjectSystemProject.cs (3)
181documentTextLoaderChangedAction: (s, d, loader) => s.WithDocumentTextLoader(d, loader, PreservationMode.PreserveValue), 188documentTextLoaderChangedAction: (s, d, loader) => s.WithAdditionalDocumentTextLoader(d, loader, PreservationMode.PreserveValue), 195documentTextLoaderChangedAction: (s, d, loader) => s.WithAnalyzerConfigDocumentTextLoader(d, loader, PreservationMode.PreserveValue),
Workspace\Solution\DocumentState.cs (1)
121PreservationMode mode = PreservationMode.PreserveValue)
Workspace\Solution\PreservationMode.cs (1)
28=> mode is >= PreservationMode.PreserveValue and <= PreservationMode.PreserveIdentity;
Workspace\Solution\Solution.cs (11)
966public Solution AddDocument(DocumentId documentId, string name, SyntaxNode syntaxRoot, IEnumerable<string>? folders = null, string? filePath = null, bool isGenerated = false, PreservationMode preservationMode = PreservationMode.PreserveValue) 1238public Solution WithDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue) 1241internal Solution WithDocumentTexts(ImmutableArray<(DocumentId documentId, SourceText text)> texts, PreservationMode mode = PreservationMode.PreserveValue) 1261public Solution WithAdditionalDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue) 1282public Solution WithAnalyzerConfigDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue) 1303public Solution WithDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1324public Solution WithAdditionalDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1345public Solution WithAnalyzerConfigDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1366public Solution WithDocumentSyntaxRoot(DocumentId documentId, SyntaxNode root, PreservationMode mode = PreservationMode.PreserveValue) 1370internal Solution WithDocumentSyntaxRoots(ImmutableArray<(DocumentId documentId, SyntaxNode root)> syntaxRoots, PreservationMode mode = PreservationMode.PreserveValue) 1592public Solution WithDocumentText(IEnumerable<DocumentId?> documentIds, SourceText text, PreservationMode mode = PreservationMode.PreserveValue)
Workspace\Solution\SolutionState.cs (6)
951public StateChange WithDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue) 979public StateChange WithAdditionalDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue) 995public StateChange WithAnalyzerConfigDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue) 1011public StateChange WithDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1027public StateChange WithAdditionalDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1043public StateChange WithAnalyzerConfigDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue)
Workspace\Solution\TextDocumentState.cs (2)
56.WithTextLoader(info.TextLoader, PreservationMode.PreserveValue); 161protected static ITextAndVersionSource CreateTextAndVersionSource(SolutionServices solutionServices, TextLoader? loader, string? filePath, LoadTextOptions loadTextOptions, PreservationMode mode = PreservationMode.PreserveValue)
Workspace\Workspace.cs (5)
1160(solution, docId, loader) => solution.WithDocumentTextLoader(docId, loader, PreservationMode.PreserveValue), 1175(solution, docId, loader) => solution.WithAdditionalDocumentTextLoader(docId, loader, PreservationMode.PreserveValue), 1190(solution, docId, loader) => solution.WithAnalyzerConfigDocumentTextLoader(docId, loader, PreservationMode.PreserveValue), 2200this.OnDocumentTextChanged(id, text, PreservationMode.PreserveValue); 2244this.OnAdditionalDocumentTextChanged(id, text, PreservationMode.PreserveValue);
Workspace\Workspace_Editor.cs (3)
409return oldSolution.WithDocumentText(documentId, newText, PreservationMode.PreserveValue); 681return oldSolution.WithDocumentTextLoader(documentId, reloader, PreservationMode.PreserveValue); 779return data.withTextDocumentTextLoader(oldSolution, documentId, data.reloader, PreservationMode.PreserveValue);
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildWorkspace.cs (2)
399this.OnDocumentTextChanged(documentId, text, PreservationMode.PreserveValue); 417this.OnAdditionalDocumentTextChanged(documentId, text, PreservationMode.PreserveValue);
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SolutionTests\SolutionTests.cs (3)
3694var doc2 = doc.Project.Solution.WithDocumentSyntaxRoot(doc.Id, newRoot, PreservationMode.PreserveValue).GetDocument(doc.Id); 4775PreservationMode.PreserveValue); 5477static (s, documentId) => s.WithDocumentTextLoader(documentId, new TestTextLoader(Guid.NewGuid().ToString()), PreservationMode.PreserveValue), documentId).GetReference();
Microsoft.VisualStudio.LanguageServices (1)
Preview\TopLevelChange.cs (1)
178solution = solution.WithTextDocumentText(updatedDocumentIdOpt, updateDocumentTextOpt, mode: PreservationMode.PreserveValue);
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
SolutionExplorer\SourceGeneratorItemTests.vb (1)
257PreservationMode.PreserveValue)