6 instantiations of AnalyzerLoadFailureEventArgs
Microsoft.CodeAnalysis (5)
DiagnosticAnalyzer\AnalyzerFileReference.cs (5)
209return new AnalyzerLoadFailureEventArgs(errorCode, message, e, typeName); 506_reference.AnalyzerLoadFailed?.Invoke(_reference, new AnalyzerLoadFailureEventArgs(AnalyzerLoadFailureEventArgs.FailureErrorCode.NoAnalyzers, CodeAnalysisResources.NoAnalyzersFound)); 555_reference.AnalyzerLoadFailed?.Invoke(_reference, new AnalyzerLoadFailureEventArgs(AnalyzerLoadFailureEventArgs.FailureErrorCode.NoAnalyzers, CodeAnalysisResources.NoAnalyzersFound)); 568_reference.AnalyzerLoadFailed?.Invoke(_reference, new AnalyzerLoadFailureEventArgs(AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesNewerCompiler, message: "") { ReferencedCompilerVersion = referencedAssemblyName.Version }); 615_reference.AnalyzerLoadFailed?.Invoke(_reference, new AnalyzerLoadFailureEventArgs(
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\AnalyzerLoadFailureTests.cs (1)
27var eventArgs = new AnalyzerLoadFailureEventArgs(
59 references to AnalyzerLoadFailureEventArgs
CodeStyleConfigFileGenerator (1)
Program.cs (1)
80static void AnalyzerFileReference_AnalyzerLoadFailed(object? sender, AnalyzerLoadFailureEventArgs e)
Microsoft.CodeAnalysis (15)
CommandLine\CommandLineArguments.cs (7)
483EventHandler<AnalyzerLoadFailureEventArgs> errorHandler = (o, e) => 490case AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToLoadAnalyzer: 493case AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer: 496case AnalyzerLoadFailureEventArgs.FailureErrorCode.NoAnalyzers: 499case AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesFramework: 502case AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesNewerCompiler: 505case AnalyzerLoadFailureEventArgs.FailureErrorCode.None:
DiagnosticAnalyzer\AnalyzerFileReference.cs (8)
46public event EventHandler<AnalyzerLoadFailureEventArgs>? AnalyzerLoadFailed; 200private static AnalyzerLoadFailureEventArgs CreateAnalyzerFailedArgs(Exception e, string? typeName = null) 206AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer : 207AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToLoadAnalyzer; 506_reference.AnalyzerLoadFailed?.Invoke(_reference, new AnalyzerLoadFailureEventArgs(AnalyzerLoadFailureEventArgs.FailureErrorCode.NoAnalyzers, CodeAnalysisResources.NoAnalyzersFound)); 555_reference.AnalyzerLoadFailed?.Invoke(_reference, new AnalyzerLoadFailureEventArgs(AnalyzerLoadFailureEventArgs.FailureErrorCode.NoAnalyzers, CodeAnalysisResources.NoAnalyzersFound)); 568_reference.AnalyzerLoadFailed?.Invoke(_reference, new AnalyzerLoadFailureEventArgs(AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesNewerCompiler, message: "") { ReferencedCompilerVersion = referencedAssemblyName.Version }); 616AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesFramework,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
Diagnostics\AnalyzerLoadFailureTests.cs (5)
14AnalyzerLoadFailureEventArgs.FailureErrorCode errorCode, 18if (errorCode == AnalyzerLoadFailureEventArgs.FailureErrorCode.None) 23var expectsTypeName = errorCode is AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer or 24AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesFramework; 27var eventArgs = new AnalyzerLoadFailureEventArgs(
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
ExternalAccess\VSMac\AnalyzerHelper.cs (1)
11public static DiagnosticData CreateAnalyzerLoadFailureDiagnostic(AnalyzerLoadFailureEventArgs e, string fullPath, ProjectId? projectId, string? language)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (7)
75public static DiagnosticData CreateAnalyzerLoadFailureDiagnostic(AnalyzerLoadFailureEventArgs e, string fullPath, ProjectId? projectId, string? language) 84case AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToLoadAnalyzer: 89case AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer: 94case AnalyzerLoadFailureEventArgs.FailureErrorCode.NoAnalyzers: 99case AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesFramework: 104case AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesNewerCompiler: 106message = string.Format(FeaturesResources.The_assembly_0_references_compiler_version_1_newer_than_2, fullPath, e.ReferencedCompilerVersion, typeof(AnalyzerLoadFailureEventArgs).Assembly.GetName().Version);
Microsoft.CodeAnalysis.UnitTests (30)
Analyzers\AnalyzerFileReferenceTests.cs (30)
147List<AnalyzerLoadFailureEventArgs> errors = new List<AnalyzerLoadFailureEventArgs>(); 148EventHandler<AnalyzerLoadFailureEventArgs> errorHandler = (o, e) => errors.Add(e); 156var failedTypes = errors.Where(e => e.ErrorCode == AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer).Select(e => e.TypeName); 166List<AnalyzerLoadFailureEventArgs> errors = new List<AnalyzerLoadFailureEventArgs>(); 167EventHandler<AnalyzerLoadFailureEventArgs> errorHandler = (o, e) => errors.Add(e); 175Assert.Equal(AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToLoadAnalyzer, errors.First().ErrorCode); 183List<AnalyzerLoadFailureEventArgs> errors = new List<AnalyzerLoadFailureEventArgs>(); 184EventHandler<AnalyzerLoadFailureEventArgs> errorHandler = (o, e) => errors.Add(e); 243List<AnalyzerLoadFailureEventArgs> errors = new List<AnalyzerLoadFailureEventArgs>(); 244EventHandler<AnalyzerLoadFailureEventArgs> errorHandler = (o, e) => errors.Add(e); 252Assert.Equal(AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer, errors.First().ErrorCode); 261List<AnalyzerLoadFailureEventArgs> errors = new List<AnalyzerLoadFailureEventArgs>(); 262EventHandler<AnalyzerLoadFailureEventArgs> errorHandler = (o, e) => errors.Add(e); 270var error = errors[0]; 273Assert.Equal(AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer, error.ErrorCode); 283List<AnalyzerLoadFailureEventArgs> errors = new List<AnalyzerLoadFailureEventArgs>(); 284EventHandler<AnalyzerLoadFailureEventArgs> errorHandler = (o, e) => errors.Add(e); 292var error = errors[0]; 293Assert.Equal(AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesNewerCompiler, error.ErrorCode); 461Assert.Equal(AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesFramework, errors.First().ErrorCode); 463List<AnalyzerLoadFailureEventArgs> buildAndLoadGeneratorAndReturnAnyErrors(string? targetFramework) 494List<AnalyzerLoadFailureEventArgs> errors = new List<AnalyzerLoadFailureEventArgs>(); 495void errorHandler(object? o, AnalyzerLoadFailureEventArgs e) => errors.Add(e);