25 references to WithAnalyzerConfigDocumentText
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
TextDocumentExtensions.cs (1)
48return textDocument.Project.Solution.WithAnalyzerConfigDocumentText(textDocument.Id, text, PreservationMode.PreserveIdentity).GetTextDocument(textDocument.Id)!;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (2)
56var newSolution1 = solution.WithAnalyzerConfigDocumentText(documentId, text, PreservationMode.PreserveIdentity); 367var newSolution = solution.WithAnalyzerConfigDocumentText(editorconfig.Id, text);
Workspaces\WorkspaceTests_EditorFeatures.cs (1)
1084var newSolution = oldSolution.WithAnalyzerConfigDocumentText(analyzerConfigDoc.Id, SourceText.From(newText));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\TestWorkspace.cs (1)
789var (oldSolution, newSolution) = this.SetCurrentSolutionEx(this.CurrentSolution.WithAnalyzerConfigDocumentText(documentId, text));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
CodeRefactorings\CodeRefactoringServiceTest.cs (1)
258return document.Project.Solution.WithAnalyzerConfigDocumentText(document.Id, newText);
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (3)
2006DocumentKind.AnalyzerConfig => solution.WithAnalyzerConfigDocumentText(documentId, GetAnalyzerConfigText(new[] { ("x", "1") })), 2033DocumentKind.AnalyzerConfig => solution.WithAnalyzerConfigDocumentText(documentId, GetAnalyzerConfigText(new[] { ("x", "2") })), 3212solution = solution.WithAnalyzerConfigDocumentText(configDocument1.Id, GetAnalyzerConfigText(configV2));
Microsoft.CodeAnalysis.Features (1)
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
291return solution.WithAnalyzerConfigDocumentText(editorConfigDocument.Id, newText);
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\RemoteWorkspace.SolutionCreator.cs (1)
463TextDocumentKind.AnalyzerConfigDocument => document.Project.Solution.WithAnalyzerConfigDocumentText(document.Id, sourceText).GetAnalyzerConfigDocument(document.Id)!,
Microsoft.CodeAnalysis.TestAnalyzerReference (1)
NonSourceFileRefactoring.cs (1)
33return document.Project.Solution.WithAnalyzerConfigDocumentText(document.Id, newText);
Microsoft.CodeAnalysis.Workspaces (5)
Shared\Extensions\ISolutionExtensions.cs (1)
50return solution.WithAnalyzerConfigDocumentText(documentId, text, mode);
TextDocumentExtensions.cs (1)
48return textDocument.Project.Solution.WithAnalyzerConfigDocumentText(textDocument.Id, text, PreservationMode.PreserveIdentity).GetTextDocument(textDocument.Id)!;
Workspace\TextExtensions.cs (1)
100return solution.WithAnalyzerConfigDocumentText(id, text, PreservationMode.PreserveIdentity)
Workspace\Workspace.cs (1)
956(solution, docId, newTextAndMode) => solution.WithAnalyzerConfigDocumentText(docId, newTextAndMode.newText, newTextAndMode.mode),
Workspace\Workspace_Editor.cs (1)
509withDocumentText: (oldSolution, documentId, newText, mode) => oldSolution.WithAnalyzerConfigDocumentText(documentId, newText, mode),
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
SolutionTests\SolutionTests.cs (7)
856var newSolution1 = solution.WithAnalyzerConfigDocumentText(documentId, text, PreservationMode.PreserveIdentity); 860var newSolution2 = newSolution1.WithAnalyzerConfigDocumentText(documentId, text, PreservationMode.PreserveIdentity); 863Assert.Throws<ArgumentNullException>(() => solution.WithAnalyzerConfigDocumentText(documentId, (SourceText)null!, PreservationMode.PreserveIdentity)); 864Assert.Throws<ArgumentOutOfRangeException>(() => solution.WithAnalyzerConfigDocumentText(documentId, text, (PreservationMode)(-1))); 866Assert.Throws<ArgumentNullException>(() => solution.WithAnalyzerConfigDocumentText((DocumentId)null!, text, PreservationMode.PreserveIdentity)); 867Assert.Throws<InvalidOperationException>(() => solution.WithAnalyzerConfigDocumentText(s_unrelatedDocumentId, text, PreservationMode.PreserveIdentity)); 887Assert.Throws<ArgumentNullException>(() => solution.WithAnalyzerConfigDocumentText(documentId, (SourceText)null!, PreservationMode.PreserveIdentity));
Roslyn.VisualStudio.Next.UnitTests (1)
Services\SolutionServiceTests.cs (1)
291return s.WithAnalyzerConfigDocumentText(analyzerConfigDocumentId, SourceText.From("root = false"));