28 instantiations of AnalyzerFileReference
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
306var analyzerReference = new AnalyzerFileReference(Path.GetFullPath(path), AssemblyLoader.Instance);
CodeStyleConfigFileGenerator (1)
Program.cs (1)
55var analyzerFileReference = new AnalyzerFileReference(assembly, AnalyzerAssemblyLoader.Instance);
GenerateRulesMissingDocumentation (1)
Program.cs (1)
153var analyzerFileReference = new AnalyzerFileReference(path, AnalyzerAssemblyLoader.Instance);
Microsoft.AspNetCore.Analyzer.Testing (1)
DiagnosticProject.cs (1)
59new AnalyzerFileReference(analyzerReference.Assembly.Location, AssemblyLoader.Instance));
Microsoft.CodeAnalysis (1)
CommandLine\CommandLineArguments.cs (1)
575return new AnalyzerFileReference(resolvedPath, analyzerLoader);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Formatting\CodeCleanupTests.cs (2)
897new AnalyzerFileReference(typeof(CSharpCompilerDiagnosticAnalyzer).Assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile), 898new AnalyzerFileReference(typeof(UseExpressionBodyDiagnosticAnalyzer).Assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
32var analyzerReference = new AnalyzerFileReference(assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
CodeFixes\CodeFixServiceTests.vb (1)
35Return New AnalyzerFileReference(fullPath, _assemblyLoader)
Diagnostics\DiagnosticServiceTests.vb (1)
36Return New AnalyzerFileReference(fullPath, _assemblyLoader)
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\HostDiagnosticAnalyzerProvider.cs (1)
25new AnalyzerFileReference(razorSourceGenerator, new SimpleAnalyzerAssemblyLoader()),
HostWorkspace\LanguageServerWorkspaceFactory.cs (1)
71references.Add(new AnalyzerFileReference(analyzerPath, analyzerLoader));
Microsoft.CodeAnalysis.UnitTests (2)
Analyzers\AnalyzerFileReferenceAppDomainTests.cs (1)
31var analyzerRef = new AnalyzerFileReference(analyzerPath, loader);
Analyzers\AnalyzerFileReferenceTests.cs (1)
48Assert.Throws<ArgumentNullException>("assemblyLoader", () => new AnalyzerFileReference(TempRoot.Root, null!));
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\IsolatedAnalyzerReferenceSet.Core.cs (1)
166? new IsolatedAnalyzerFileReference(this, new AnalyzerFileReference(fullPath, _shadowCopyLoader))
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
802initialReferenceList.Add(new AnalyzerFileReference(analyzer, sharedShadowCopyLoader));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
2938var aref = new AnalyzerFileReference(myAnalyzerPath, new InMemoryAssemblyLoader());
Microsoft.VisualStudio.LanguageServices (1)
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.cs (1)
88analyzePaths.Add(new AnalyzerFileReference(assemblyPath, AnalyzerAssemblyLoader), identifier);
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
Diagnostics\VisualStudioDiagnosticAnalyzerProviderTests.vb (1)
55Dim hostAnalyzers = New HostDiagnosticAnalyzers(ImmutableArray.Create(Of AnalyzerReference)(New AnalyzerFileReference(analyzerFile.Path, analyzerLoader)))
Roslyn.VisualStudio.Next.UnitTests (9)
Remote\SnapshotSerializationTests.cs (4)
59.AddAnalyzerReference(new AnalyzerFileReference(Path.Combine(TempRoot.Root, "path1"), new TestAnalyzerAssemblyLoader())) 63.WithAnalyzerReferences([new AnalyzerFileReference(Path.Combine(TempRoot.Root, "path2"), new TestAnalyzerAssemblyLoader())]) 485var analyzer1 = new AnalyzerFileReference(file1.Path, TestAnalyzerAssemblyLoader.LoadNotImplemented); 486var analyzer2 = new AnalyzerFileReference(file2.Path, TestAnalyzerAssemblyLoader.LoadNotImplemented);
Services\ServiceHubServicesTests.cs (1)
1729.AddAnalyzerReference(new AnalyzerFileReference(typeof(object).Assembly.Location, new TestAnalyzerAssemblyLoader()));
Services\SolutionServiceTests.cs (1)
511.AddAnalyzerReference(new AnalyzerFileReference(typeof(Microsoft.CodeAnalysis.TestSourceGenerator.HelloWorldGenerator).Assembly.Location, new TestAnalyzerAssemblyLoader()))
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (3)
152var analyzerReference = new AnalyzerFileReference(analyzerType.Assembly.Location, new TestAnalyzerAssemblyLoader()); 189var analyzerReference = new AnalyzerFileReference(analyzerType.Assembly.Location, new TestAnalyzerAssemblyLoader()); 222var analyzerReference = new AnalyzerFileReference(analyzerType.Assembly.Location, new TestAnalyzerAssemblyLoader());
97 references to AnalyzerFileReference
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
306var analyzerReference = new AnalyzerFileReference(Path.GetFullPath(path), AssemblyLoader.Instance);
CodeStyleConfigFileGenerator (1)
Program.cs (1)
55var analyzerFileReference = new AnalyzerFileReference(assembly, AnalyzerAssemblyLoader.Instance);
GenerateRulesMissingDocumentation (1)
Program.cs (1)
153var analyzerFileReference = new AnalyzerFileReference(path, AnalyzerAssemblyLoader.Instance);
Microsoft.CodeAnalysis (15)
CommandLine\CommandLineArguments.cs (9)
460/// <returns>Yields resolved <see cref="AnalyzerFileReference"/> or <see cref="UnresolvedAnalyzerReference"/>.</returns> 485var analyzerReference = o as AnalyzerFileReference; 503diagnostic = new DiagnosticInfo(messageProvider, messageProvider.WRN_AnalyzerReferencesNewerCompiler, analyzerReference.FullPath, e.ReferencedCompilerVersion!.ToString(), typeof(AnalyzerFileReference).Assembly.GetName().Version!.ToString()); 519var resolvedReferencesSet = PooledHashSet<AnalyzerFileReference>.GetInstance(); 520var resolvedReferencesList = ArrayBuilder<AnalyzerFileReference>.GetInstance(); 523var resolvedReference = ResolveAnalyzerReference(reference, analyzerLoader); 547foreach (var resolvedReference in resolvedReferencesList) 565private AnalyzerFileReference? ResolveAnalyzerReference(CommandLineAnalyzerReference reference, IAnalyzerAssemblyLoader analyzerLoader)
DiagnosticAnalyzer\AnalyzerFileReference.cs (6)
71=> Equals(obj as AnalyzerFileReference); 73public bool Equals(AnalyzerFileReference? other) 98if (other is AnalyzerFileReference fileReference) 369private readonly AnalyzerFileReference _reference; 378internal Extensions(AnalyzerFileReference reference, Type attributeType, AttributeLanguagesFunc languagesFunc, bool allowNetFramework, Func<object?, TExtension?>? coerceFunction = null) 561var runningCompilerAssemblyName = typeof(AnalyzerFileReference).Assembly.GetName();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
32var analyzerReference = new AnalyzerFileReference(assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
CodeFixes\CodeFixServiceTests.vb (1)
34Public Function CreateAnalyzerFileReference(ByVal fullPath As String) As AnalyzerFileReference
Diagnostics\DiagnosticServiceTests.vb (1)
35Public Function CreateAnalyzerFileReference(ByVal fullPath As String) As AnalyzerFileReference
Microsoft.CodeAnalysis.Features (3)
Common\AbstractProjectExtensionProvider.cs (3)
148var analyzerFileReference = GetAnalyzerFileReference(this.Reference); 189static AnalyzerFileReference? GetAnalyzerFileReference(AnalyzerReference reference) 191if (reference is AnalyzerFileReference analyzerFileReference)
Microsoft.CodeAnalysis.LanguageServer (5)
HostWorkspace\HostDiagnosticAnalyzerProvider.cs (4)
14private readonly ImmutableArray<(AnalyzerFileReference reference, string extensionId)> _analyzerReferences; 20_analyzerReferences = ImmutableArray<(AnalyzerFileReference reference, string extensionId)>.Empty; 24_analyzerReferences = ImmutableArray.Create<(AnalyzerFileReference reference, string extensionId)>(( 31public ImmutableArray<(AnalyzerFileReference reference, string extensionId)> GetAnalyzerReferencesInExtensions()
HostWorkspace\LanguageServerWorkspaceFactory.cs (1)
59var references = new List<AnalyzerFileReference>();
Microsoft.CodeAnalysis.UnitTests (28)
AnalyzerAssemblyLoaderTests.cs (4)
246var analyzerMainReference = new AnalyzerFileReference(analyzerMainFile, loader); 248var analyzerDependencyReference = new AnalyzerFileReference(analyzerDependencyFile, loader); 763var analyzerMainReference = new AnalyzerFileReference(analyzerMainFile, loader); 765var analyzerDependencyReference = new AnalyzerFileReference(analyzerDependencyFile, loader);
Analyzers\AnalyzerFileReferenceAppDomainTests.cs (1)
31var analyzerRef = new AnalyzerFileReference(analyzerPath, loader);
Analyzers\AnalyzerFileReferenceTests.cs (23)
39public static AnalyzerFileReference CreateAnalyzerFileReference(string fullPath) 58var refBadPath = new AnalyzerFileReference(PathUtilities.CombinePathsUnchecked(TempRoot.Root, "\0<>|*.xyz"), loader); 73var refA = new AnalyzerFileReference(path1, loader1); 74var refB = new AnalyzerFileReference(path1, loader1); 98AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 124AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 145AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 164AnalyzerFileReference reference = CreateAnalyzerFileReference(Path.Combine(TempRoot.Root, "random.dll")); 181AnalyzerFileReference reference = CreateAnalyzerFileReference(_testFixture.Alpha); 200AnalyzerFileReference reference = CreateAnalyzerFileReference(textFile); 208AnalyzerFileReference reference = CreateAnalyzerFileReference(_testFixture.Alpha); 218AnalyzerFileReference reference = CreateAnalyzerFileReference(_testFixture.Alpha); 232AnalyzerFileReference reference = CreateAnalyzerFileReference(textFile); 241AnalyzerFileReference reference = CreateAnalyzerFileReference(_testFixture.FaultyAnalyzer); 259AnalyzerFileReference reference = CreateAnalyzerFileReference(_testFixture.AnalyzerWithFakeCompilerDependency); 281AnalyzerFileReference reference = CreateAnalyzerFileReference(_testFixture.AnalyzerWithLaterFakeCompilerDependency); 367AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 391AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 404AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 426AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 493AnalyzerFileReference reference = CreateAnalyzerFileReference(generatorPath); 517AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 550AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location);
Microsoft.CodeAnalysis.Workspaces (17)
Serialization\SerializerService_Reference.cs (5)
29/// pretend that a <see cref="AnalyzerImageReference"/> is a <see cref="AnalyzerFileReference"/> during tests. 71case AnalyzerFileReference fileReference: 120case AnalyzerFileReference fileReference: 121writer.WriteString(nameof(AnalyzerFileReference)); 160case nameof(AnalyzerFileReference):
SourceGeneration\IRemoteSourceGenerationService.cs (2)
56/// cref="AnalyzerFileReference.FullPath"/> equal to <paramref name="analyzerReferenceFullPath"/>. 62/// Returns whether or not the the <see cref="AnalyzerReference"/> with <see cref="AnalyzerFileReference.FullPath"/>
Workspace\IsolatedAnalyzerFileReference.cs (3)
17/// Wrapper around a real <see cref="AnalyzerFileReference"/>. An "isolated" analyzer reference is an analyzer 34AnalyzerFileReference underlyingAnalyzerReference) 56public readonly AnalyzerFileReference UnderlyingAnalyzerFileReference = underlyingAnalyzerReference;
Workspace\IsolatedAnalyzerReferenceSet.Core.cs (4)
55/// To determine if we have a conflict, we keep track of the mvid of each <see cref="AnalyzerFileReference"/> when 71/// Mapping from <see cref="AnalyzerFileReference.FullPath"/> to the mvid for that reference with this isolated 165var finalReference = analyzerReference is AnalyzerFileReference { FullPath: var fullPath } 311if (analyzerReference is AnalyzerFileReference analyzerFileReference)
Workspace\ProjectSystem\IHostDiagnosticAnalyzerProvider.cs (1)
16ImmutableArray<(AnalyzerFileReference reference, string extensionId)> GetAnalyzerReferencesInExtensions();
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
782using var _ = ArrayBuilder<AnalyzerFileReference>.GetInstance(out var initialReferenceList);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
860/// cref="PortableExecutableReference"/> or <see cref="AnalyzerFileReference"/>.
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildWorkspace.cs (2)
680if (analyzerReference is AnalyzerFileReference fileRef) 692if (analyzerReference is AnalyzerFileReference fileRef)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
2328var analyzerReference = proj.AnalyzerReferences[0] as AnalyzerFileReference; 2938var aref = new AnalyzerFileReference(myAnalyzerPath, new InMemoryAssemblyLoader());
Microsoft.VisualStudio.LanguageServices (6)
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.cs (6)
33private readonly Lazy<ImmutableArray<(AnalyzerFileReference reference, string extensionId)>> _lazyAnalyzerReferences; 43_lazyAnalyzerReferences = new Lazy<ImmutableArray<(AnalyzerFileReference, string)>>(GetAnalyzerReferencesImpl); 46public ImmutableArray<(AnalyzerFileReference reference, string extensionId)> GetAnalyzerReferencesInExtensions() 49private ImmutableArray<(AnalyzerFileReference reference, string extensionId)> GetAnalyzerReferencesImpl() 55var _ = PooledDictionary<AnalyzerFileReference, string>.GetInstance(out var analyzePaths); 107return ImmutableArray<(AnalyzerFileReference, string)>.Empty;
Roslyn.VisualStudio.Next.UnitTests (12)
Remote\SnapshotSerializationTests.cs (9)
392var reference = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader()); 406var reference = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader()); 427var reference = new AnalyzerFileReference(location, new MockShadowCopyAnalyzerAssemblyLoader(ImmutableDictionary<string, string>.Empty.Add(location, file.Path))); 448var reference = new AnalyzerFileReference(location, new MockShadowCopyAnalyzerAssemblyLoader(ImmutableDictionary<string, string>.Empty.Add(location, file.Path))); 461var reference = CreateShadowCopiedAnalyzerReference(tempRoot); 485var analyzer1 = new AnalyzerFileReference(file1.Path, TestAnalyzerAssemblyLoader.LoadNotImplemented); 486var analyzer2 = new AnalyzerFileReference(file2.Path, TestAnalyzerAssemblyLoader.LoadNotImplemented); 504var analyzer = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader()); 693private static AnalyzerFileReference CreateShadowCopiedAnalyzerReference(TempRoot tempRoot)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (3)
152var analyzerReference = new AnalyzerFileReference(analyzerType.Assembly.Location, new TestAnalyzerAssemblyLoader()); 189var analyzerReference = new AnalyzerFileReference(analyzerType.Assembly.Location, new TestAnalyzerAssemblyLoader()); 222var analyzerReference = new AnalyzerFileReference(analyzerType.Assembly.Location, new TestAnalyzerAssemblyLoader());