2 types derived from AnalyzerAssemblyLoader
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\DefaultAnalyzerAssemblyLoader.cs (1)
16
internal sealed class DefaultAnalyzerAssemblyLoader :
AnalyzerAssemblyLoader
DiagnosticAnalyzer\ShadowCopyAnalyzerAssemblyLoader.cs (1)
19
internal sealed class ShadowCopyAnalyzerAssemblyLoader :
AnalyzerAssemblyLoader
52 references to AnalyzerAssemblyLoader
Microsoft.CodeAnalysis (3)
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (3)
27
_compilerLoadContext = compilerLoadContext ?? AssemblyLoadContext.GetLoadContext(typeof(
AnalyzerAssemblyLoader
).GetTypeInfo().Assembly)!;
76
private readonly
AnalyzerAssemblyLoader
_loader;
79
public DirectoryLoadContext(string directory,
AnalyzerAssemblyLoader
loader, AssemblyLoadContext compilerLoadContext)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTestBase.cs (2)
56
internal MockCSharpCompiler CreateCSharpCompiler(string[] args, DiagnosticAnalyzer[]? analyzers = null, ISourceGenerator[]? generators = null,
AnalyzerAssemblyLoader
? loader = null, GeneratorDriverCache? driverCache = null)
61
internal MockCSharpCompiler CreateCSharpCompiler(string? responseFile, string workingDirectory, string[] args, DiagnosticAnalyzer[]? analyzers = null, ISourceGenerator[]? generators = null,
AnalyzerAssemblyLoader
? loader = null, GeneratorDriverCache? driverCache = null)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
MockCSharpCompiler.cs (2)
24
public MockCSharpCompiler(string responseFile, string workingDirectory, string[] args, ImmutableArray<DiagnosticAnalyzer> analyzers = default, ImmutableArray<ISourceGenerator> generators = default,
AnalyzerAssemblyLoader
loader = null)
29
public MockCSharpCompiler(string responseFile, BuildPaths buildPaths, string[] args, ImmutableArray<DiagnosticAnalyzer> analyzers = default, ImmutableArray<ISourceGenerator> generators = default,
AnalyzerAssemblyLoader
loader = null, GeneratorDriverCache driverCache = null)
Microsoft.CodeAnalysis.UnitTests (45)
AnalyzerAssemblyLoaderTests.cs (43)
90
private void Run(bool shadowLoad, Action<
AnalyzerAssemblyLoader
, AssemblyLoadTestFixture> testAction, [CallerMemberName] string? memberName = null) =>
100
Action<
AnalyzerAssemblyLoader
, AssemblyLoadTestFixture> testAction,
145
internal static void InvokeTestCode(
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture fixture, string typeName, string methodName)
164
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
189
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
200
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
211
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
224
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
254
/// The loaders should not actually look at the contents of the disk until a <see cref="
AnalyzerAssemblyLoader
.LoadFromPath(string)"/>
263
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
285
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
297
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
330
private static void VerifyAssemblies(
AnalyzerAssemblyLoader
loader, IEnumerable<Assembly> assemblies, params (string simpleName, string version, string path)[] expected) =>
333
private static void VerifyAssemblies(
AnalyzerAssemblyLoader
loader, IEnumerable<Assembly> assemblies, int? expectedCopyCount, params (string simpleName, string version, string path)[] expected)
353
private static void VerifyAssemblies(
AnalyzerAssemblyLoader
loader, IEnumerable<Assembly> assemblies, int? copyCount, params string[] assemblyPaths)
368
private static void VerifyDependencyAssemblies(
AnalyzerAssemblyLoader
loader, params string[] assemblyPaths) =>
371
private static void VerifyDependencyAssemblies(
AnalyzerAssemblyLoader
loader, int? copyCount, params string[] assemblyPaths)
423
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
451
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
487
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
542
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
575
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
605
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
662
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
721
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
771
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
805
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
857
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
916
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader1, AssemblyLoadTestFixture testFixture) =>
979
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1008
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1043
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1073
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1100
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1118
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1139
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1156
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1179
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1210
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1250
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1271
Run(shadowLoad, static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
1315
_ = compilerContext.LoadFromAssemblyPath(typeof(
AnalyzerAssemblyLoader
).GetTypeInfo().Assembly.Location);
1317
static (
AnalyzerAssemblyLoader
loader, AssemblyLoadTestFixture testFixture) =>
Analyzers\AnalyzerFileReferenceTests.cs (1)
32
private static readonly
AnalyzerAssemblyLoader
s_analyzerLoader = new DefaultAnalyzerAssemblyLoader();
InvokeUtil.cs (1)
49
AnalyzerAssemblyLoader
loader = shadowLoad