1 instantiation of AnalyzerConfigDocument
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\Project.cs (1)
472(documentId, project) => project.State.AnalyzerConfigDocumentStates.TryGetState(documentId, out var state) ? new AnalyzerConfigDocument(project, state) : null;
52 references to AnalyzerConfigDocument
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (3)
70AnalyzerConfigDocument? bestAnalyzerConfigDocument = null; 71foreach (var analyzerConfigDocument in project.AnalyzerConfigDocuments) 102public static AnalyzerConfigDocument? TryGetExistingAnalyzerConfigDocumentAtPath(this Project project, string analyzerConfigPath)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\TextDocumentExtensions.cs (2)
34case AnalyzerConfigDocument analyzerConfigDocument: 59Contract.ThrowIfFalse(textDocument is AnalyzerConfigDocument);
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)
1086var analyzerConfigDocument = project.GetAnalyzerConfigDocument(analyzerConfigDoc.Id); 1155var doc = workspace.CurrentSolution.GetAnalyzerConfigDocument(analyzerConfigDoc.Id); 1275var 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)
59if (document is AnalyzerConfigDocument)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeRefactorings\CodeRefactoringServiceTest.cs (2)
210var editorConfig = project.AnalyzerConfigDocuments.Single(t => t.Name == ".editorconfig"); 225var globalConfig = project.AnalyzerConfigDocuments.Single(t => t.Name == ".globalconfig");
Microsoft.CodeAnalysis.Features (12)
CodeFixes\Configuration\ConfigurationUpdater.cs (12)
103/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/> 122/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/> 153/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/> 168/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/> 194/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/> 264var editorConfigDocument = FindOrGenerateEditorConfig(); 284private AnalyzerConfigDocument? FindOrGenerateEditorConfig() 302AnalyzerConfigDocument? analyzerConfigDocument = null; 310var addedAnalyzerConfigDocument = GetOrCreateAnalyzerConfigDocument(project, analyzerConfigPath); 322private static AnalyzerConfigDocument? GetOrCreateAnalyzerConfigDocument(Project project, string analyzerConfigPath) 396private SourceText? GetNewAnalyzerConfigDocumentText(SourceText originalText, AnalyzerConfigDocument editorConfigDocument) 418AnalyzerConfigDocument editorConfigDocument)
Microsoft.CodeAnalysis.Workspaces (20)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (3)
70AnalyzerConfigDocument? bestAnalyzerConfigDocument = null; 71foreach (var analyzerConfigDocument in project.AnalyzerConfigDocuments) 102public static AnalyzerConfigDocument? TryGetExistingAnalyzerConfigDocumentAtPath(this Project project, string analyzerConfigPath)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\TextDocumentExtensions.cs (2)
34case AnalyzerConfigDocument analyzerConfigDocument: 59Contract.ThrowIfFalse(textDocument is AnalyzerConfigDocument);
Workspace\Solution\Project.cs (8)
32private ImmutableDictionary<DocumentId, AnalyzerConfigDocument?> _idToAnalyzerConfigDocumentMap = ImmutableDictionary<DocumentId, AnalyzerConfigDocument?>.Empty; 204/// All the <see cref="AnalyzerConfigDocument"/>s associated with this project. 206public IEnumerable<AnalyzerConfigDocument> AnalyzerConfigDocuments => AnalyzerConfigDocumentIds.Select(GetAnalyzerConfigDocument)!; 221/// True if the project contains an <see cref="AnalyzerConfigDocument"/> with the specified ID. 253public AnalyzerConfigDocument? GetAnalyzerConfigDocument(DocumentId documentId) 471private static readonly Func<DocumentId, Project, AnalyzerConfigDocument?> s_tryCreateAnalyzerConfigDocumentFunction = 800/// Creates a new solution instance that no longer includes the specified <see cref="AnalyzerConfigDocument"/>s.
Workspace\Solution\Solution.cs (4)
286public AnalyzerConfigDocument? GetAnalyzerConfigDocument(DocumentId? documentId) 1167/// Creates a new solution instance that no longer includes the specified <see cref="AnalyzerConfigDocument"/>. 1176/// Creates a new solution instance that no longer includes the specified <see cref="AnalyzerConfigDocument"/>s. 1672/// including <see cref="AdditionalDocument"/>s or <see cref="AnalyzerConfigDocument" />s.
Workspace\Solution\TextDocumentKind.cs (1)
23/// Indicates an <see cref="CodeAnalysis.AnalyzerConfigDocument"/>
Workspace\Workspace.cs (2)
1917var document = projectChanges.NewProject.GetAnalyzerConfigDocument(documentId)!; 1942var newDoc = projectChanges.NewProject.GetAnalyzerConfigDocument(documentId)!;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
3244var analyzerConfigDocument = Assert.Single(project.AnalyzerConfigDocuments.Where(d => d.FilePath == expectedEditorConfigPath));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
WorkspaceTests\AdhocWorkspaceTests.cs (1)
299var doc = ws.CurrentSolution.GetAnalyzerConfigDocument(docInfo.Id);