11 types derived from AnalyzerReference
Microsoft.CodeAnalysis (4)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
272 references to AnalyzerReference
AnalyzerRunner (1)
Microsoft.CodeAnalysis (3)
Microsoft.CodeAnalysis.EditorFeatures (4)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (6)
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (3)
Microsoft.CodeAnalysis.Features (16)
Microsoft.CodeAnalysis.LanguageServer.Protocol (10)
Microsoft.CodeAnalysis.Remote.ServiceHub (10)
Microsoft.CodeAnalysis.Remote.Workspaces (2)
Microsoft.CodeAnalysis.Test.Utilities (3)
Microsoft.CodeAnalysis.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces (148)
Diagnostics\HostDiagnosticAnalyzers.cs (24)
19/// Key is <see cref="AnalyzerReference.Id"/>.
23private readonly ImmutableDictionary<object, AnalyzerReference> _hostAnalyzerReferencesMap;
34/// Key is <see cref="AnalyzerReference.Id"/>.
36/// Value is set of <see cref="DiagnosticAnalyzer"/> that belong to the <see cref="AnalyzerReference"/>.
55private readonly ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, StrongBox<ImmutableDictionary<string, SkippedHostAnalyzersInfo>>> _skippedHostAnalyzers = new();
57internal HostDiagnosticAnalyzers(IReadOnlyList<AnalyzerReference> hostAnalyzerReferences)
68/// List of host <see cref="AnalyzerReference"/>s
70public IReadOnlyList<AnalyzerReference> HostAnalyzerReferences { get; }
73/// Get <see cref="AnalyzerReference"/> identity and <see cref="DiagnosticAnalyzer"/>s map for given <paramref name="language"/>
94ImmutableDictionary<object, AnalyzerReference> map)
100if (!map.TryGetValue(id, out var reference) || reference == null)
121/// Create <see cref="AnalyzerReference"/> identity and <see cref="DiagnosticAnalyzer"/>s map for given <paramref name="project"/> that
133/// Create <see cref="AnalyzerReference"/> identity and <see cref="DiagnosticAnalyzer"/>s map for given <paramref name="project"/> that
139public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateProjectDiagnosticAnalyzersPerReference(IReadOnlyList<AnalyzerReference> projectAnalyzerReferences, string language)
156private ImmutableDictionary<object, AnalyzerReference> CreateProjectAnalyzerReferencesMap(IReadOnlyList<AnalyzerReference> projectAnalyzerReferences)
220IDictionary<object, AnalyzerReference> analyzerReferencesMap, string? language = null)
239static IEnumerable<KeyValuePair<object, AnalyzerReference>> Shuffle(IDictionary<object, AnalyzerReference> source)
248using var _ = ArrayBuilder<KeyValuePair<object, AnalyzerReference>>.GetInstance(source.Count, out var builder);
260private static ImmutableDictionary<object, AnalyzerReference> CreateAnalyzerReferencesMap(IEnumerable<AnalyzerReference> analyzerReferences)
262var builder = ImmutableDictionary.CreateBuilder<object, AnalyzerReference>();
263foreach (var reference in analyzerReferences)
Workspace\Workspace.cs (17)
127private Solution CreateSolution(SolutionInfo solutionInfo, SolutionOptionSet options, IReadOnlyList<AnalyzerReference> analyzerReferences, ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions)
930protected internal void OnAnalyzerReferenceAdded(ProjectId projectId, AnalyzerReference analyzerReference)
942protected internal void OnAnalyzerReferenceRemoved(ProjectId projectId, AnalyzerReference analyzerReference)
954internal void OnSolutionAnalyzerReferenceAdded(AnalyzerReference analyzerReference)
966internal void OnSolutionAnalyzerReferenceRemoved(AnalyzerReference analyzerReference)
1564foreach (var analyzerReference in solutionChanges.GetRemovedAnalyzerReferences())
1569foreach (var analyzerReference in solutionChanges.GetAddedAnalyzerReferences())
1867foreach (var analyzerReference in projectChanges.GetRemovedAnalyzerReferences())
1873foreach (var analyzerReference in projectChanges.GetAddedAnalyzerReferences())
2131protected virtual void ApplyAnalyzerReferenceAdded(ProjectId projectId, AnalyzerReference analyzerReference)
2142protected virtual void ApplyAnalyzerReferenceRemoved(ProjectId projectId, AnalyzerReference analyzerReference)
2153internal void ApplySolutionAnalyzerReferenceAdded(AnalyzerReference analyzerReference)
2164internal void ApplySolutionAnalyzerReferenceRemoved(AnalyzerReference analyzerReference)
2394protected void CheckProjectHasAnalyzerReference(ProjectId projectId, AnalyzerReference analyzerReference)
2405protected void CheckProjectDoesNotHaveAnalyzerReference(ProjectId projectId, AnalyzerReference analyzerReference)
2416internal static void CheckSolutionHasAnalyzerReference(Solution solution, AnalyzerReference analyzerReference)
2427internal static void CheckSolutionDoesNotHaveAnalyzerReference(Solution solution, AnalyzerReference analyzerReference)
Microsoft.CodeAnalysis.Workspaces.MSBuild (7)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (19)
Microsoft.CodeAnalysis.Workspaces.UnitTests (21)
Microsoft.VisualStudio.LanguageServices (7)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
Roslyn.VisualStudio.Next.UnitTests (1)