10 references to WithAnalyzerConfigDocumentTextLoader
Microsoft.CodeAnalysis.Workspaces (3)
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
179
documentTextLoaderChangedAction: (s, d, loader) => s.
WithAnalyzerConfigDocumentTextLoader
(d, loader, PreservationMode.PreserveValue),
Workspace\Workspace.cs (1)
998
(solution, docId, loader) => solution.
WithAnalyzerConfigDocumentTextLoader
(docId, loader, PreservationMode.PreserveValue),
Workspace\Workspace_Editor.cs (1)
641
withTextDocumentTextLoader: (oldSolution, documentId, textLoader, mode) => oldSolution.
WithAnalyzerConfigDocumentTextLoader
(documentId, textLoader, mode));
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
SolutionTests\SolutionTests.cs (7)
946
var newSolution1 = solution.
WithAnalyzerConfigDocumentTextLoader
(documentId, loader, PreservationMode.PreserveIdentity);
950
var newSolution2 = solution.
WithAnalyzerConfigDocumentTextLoader
(documentId, loader, PreservationMode.PreserveIdentity);
953
Assert.Throws<ArgumentNullException>(() => solution.
WithAnalyzerConfigDocumentTextLoader
(documentId, null!, PreservationMode.PreserveIdentity));
954
Assert.Throws<ArgumentOutOfRangeException>(() => solution.
WithAnalyzerConfigDocumentTextLoader
(documentId, loader, (PreservationMode)(-1)));
956
Assert.Throws<ArgumentNullException>(() => solution.
WithAnalyzerConfigDocumentTextLoader
(null!, loader, PreservationMode.PreserveIdentity));
957
Assert.Throws<InvalidOperationException>(() => solution.
WithAnalyzerConfigDocumentTextLoader
(s_unrelatedDocumentId, loader, PreservationMode.PreserveIdentity));
4021
solution = solution.
WithAnalyzerConfigDocumentTextLoader
(