1 instantiation of AnalyzerConfigDocument
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\Project.cs (1)
453(documentId, project) => project._projectState.AnalyzerConfigDocumentStates.TryGetState(documentId, out var state) ? new AnalyzerConfigDocument(project, state) : null;
61 references to AnalyzerConfigDocument
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
ProjectExtensions.cs (3)
65AnalyzerConfigDocument? bestAnalyzerConfigDocument = null; 66foreach (var analyzerConfigDocument in project.AnalyzerConfigDocuments) 97public static AnalyzerConfigDocument? TryGetExistingAnalyzerConfigDocumentAtPath(this Project project, string analyzerConfigPath)
TextDocumentExtensions.cs (2)
22case AnalyzerConfigDocument analyzerConfigDocument: 47Contract.ThrowIfFalse(textDocument is AnalyzerConfigDocument);
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (2)
AbstractCodeActionOrUserDiagnosticTest.cs (2)
703foreach (var analyzerConfigDoc in project.AnalyzerConfigDocuments) 714var expectedDocument = expectedProject.AnalyzerConfigDocuments.Single(d => d.FilePath == analyzerConfigDoc.FilePath);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (8)
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (5)
51private static AnalyzerConfigDocument CreateAnalyzerConfigDocument(Workspace workspace, string contents) 57var analyzerConfigDocument = newSolution1.GetAnalyzerConfigDocument(documentId); 66var analyzerConfigDocument = CreateAnalyzerConfigDocument(workspace, initialEditorConfig); 75var analyzerConfigDocument = CreateAnalyzerConfigDocument(workspace, initialEditorConfig); 364var editorconfig = solution.Projects.SelectMany(p => p.AnalyzerConfigDocuments.Where(a => a.FilePath == EditorconfigPath)).Single();
Workspaces\WorkspaceTests_EditorFeatures.cs (3)
1027var analyzerConfigDocument = project.GetAnalyzerConfigDocument(analyzerConfigDoc.Id); 1092var doc = workspace.CurrentSolution.GetAnalyzerConfigDocument(analyzerConfigDoc.Id); 1208var doc = workspace.CurrentSolution.GetAnalyzerConfigDocument(analyzerConfigDoc.Id);
Microsoft.CodeAnalysis.EditorFeatures (3)
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (2)
50public async Task<SourceText?> GetChangedEditorConfigAsync(AnalyzerConfigDocument? analyzerConfigDocument, CancellationToken token) 75var analyzerConfigDocument = solution.Projects
Shared\Preview\PreviewWorkspace.cs (1)
65if (document is AnalyzerConfigDocument)
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (2)
CodeActions\AbstractCodeActionOrUserDiagnosticTest.cs (2)
703foreach (var analyzerConfigDoc in project.AnalyzerConfigDocuments) 714var expectedDocument = expectedProject.AnalyzerConfigDocuments.Single(d => d.FilePath == analyzerConfigDoc.FilePath);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
CodeRefactorings\CodeRefactoringServiceTest.cs (3)
219var editorConfig = project.AnalyzerConfigDocuments.Single(t => t.Name == ".editorconfig"); 229var changedEditorConfig = solution.Projects.Single().AnalyzerConfigDocuments.Single(t => t.Id == editorConfig.Id); 234var globalConfig = project.AnalyzerConfigDocuments.Single(t => t.Name == ".globalconfig");
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
3211var configDocument1 = solution.Projects.Single().AnalyzerConfigDocuments.Single();
Microsoft.CodeAnalysis.Features (13)
CodeFixes\Configuration\ConfigurationUpdater.cs (13)
107/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/> 126/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/> 157/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/> 172/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/> 198/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/> 268var editorConfigDocument = FindOrGenerateEditorConfig(); 294private AnalyzerConfigDocument? FindOrGenerateEditorConfig() 312AnalyzerConfigDocument? analyzerConfigDocument = null; 320var addedAnalyzerConfigDocument = GetOrCreateAnalyzerConfigDocument(project, analyzerConfigPath); 332private static AnalyzerConfigDocument? GetOrCreateAnalyzerConfigDocument(Project project, string analyzerConfigPath) 334var existingAnalyzerConfigDocument = project.TryGetExistingAnalyzerConfigDocumentAtPath(analyzerConfigPath); 413private SourceText? GetNewAnalyzerConfigDocumentText(SourceText originalText, AnalyzerConfigDocument editorConfigDocument) 435AnalyzerConfigDocument editorConfigDocument)
Microsoft.CodeAnalysis.Workspaces (21)
ProjectExtensions.cs (3)
65AnalyzerConfigDocument? bestAnalyzerConfigDocument = null; 66foreach (var analyzerConfigDocument in project.AnalyzerConfigDocuments) 97public static AnalyzerConfigDocument? TryGetExistingAnalyzerConfigDocumentAtPath(this Project project, string analyzerConfigPath)
TextDocumentExtensions.cs (2)
22case AnalyzerConfigDocument analyzerConfigDocument: 47Contract.ThrowIfFalse(textDocument is AnalyzerConfigDocument);
Workspace\AdhocWorkspace.cs (2)
212var doc = this.CurrentSolution.GetAnalyzerConfigDocument(documentId); 225var doc = this.CurrentSolution.GetAnalyzerConfigDocument(documentId);
Workspace\Solution\Project.cs (8)
34private ImmutableHashMap<DocumentId, AnalyzerConfigDocument> _idToAnalyzerConfigDocumentMap = ImmutableHashMap<DocumentId, AnalyzerConfigDocument>.Empty; 201/// All the <see cref="AnalyzerConfigDocument"/>s associated with this project. 203public IEnumerable<AnalyzerConfigDocument> AnalyzerConfigDocuments => AnalyzerConfigDocumentIds.Select(GetAnalyzerConfigDocument)!; 218/// True if the project contains an <see cref="AnalyzerConfigDocument"/> with the specified ID. 250public AnalyzerConfigDocument? GetAnalyzerConfigDocument(DocumentId documentId) 452private static readonly Func<DocumentId, Project, AnalyzerConfigDocument?> s_tryCreateAnalyzerConfigDocumentFunction = 765/// Creates a new solution instance that no longer includes the specified <see cref="AnalyzerConfigDocument"/>s.
Workspace\Solution\Solution.cs (3)
254public AnalyzerConfigDocument? GetAnalyzerConfigDocument(DocumentId? documentId) 1274/// Creates a new solution instance that no longer includes the specified <see cref="AnalyzerConfigDocument"/>. 1283/// Creates a new solution instance that no longer includes the specified <see cref="AnalyzerConfigDocument"/>s.
Workspace\Solution\TextDocumentKind.cs (1)
23/// Indicates an <see cref="CodeAnalysis.AnalyzerConfigDocument"/>
Workspace\Workspace.cs (2)
1667var document = projectChanges.NewProject.GetAnalyzerConfigDocument(documentId)!; 1692var newDoc = projectChanges.NewProject.GetAnalyzerConfigDocument(documentId)!;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
3179var analyzerConfigDocument = Assert.Single(project.AnalyzerConfigDocuments.Where(d => d.FilePath == expectedEditorConfigPath));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
WorkspaceTests\AdhocWorkspaceTests.cs (1)
303var doc = ws.CurrentSolution.GetAnalyzerConfigDocument(docInfo.Id);
Microsoft.VisualStudio.LanguageServices (1)
EditorConfigSettings\SettingsEditorControl.xaml.cs (1)
84var analyzerConfigDocument = solution.Projects