33 references to FailureErrorCode
Microsoft.CodeAnalysis (18)
CommandLine\CommandLineArguments.cs (6)
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 (7)
205var errorCode = (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,
DiagnosticAnalyzer\AnalyzerLoadFailureEventArgs.cs (5)
34public FailureErrorCode ErrorCode { get; } 42/// If <see cref="ErrorCode"/> is <see cref="FailureErrorCode.ReferencesNewerCompiler"/>, returns the compiler version referenced by the analyzer assembly. Otherwise, returns null. 46public AnalyzerLoadFailureEventArgs(FailureErrorCode errorCode, string message, Exception? exceptionOpt = null, string? typeNameOpt = null) 48if (errorCode <= FailureErrorCode.None || errorCode > FailureErrorCode.ReferencesNewerCompiler)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Diagnostics\AnalyzerLoadFailureTests.cs (4)
14AnalyzerLoadFailureEventArgs.FailureErrorCode errorCode, 18if (errorCode == AnalyzerLoadFailureEventArgs.FailureErrorCode.None) 23var expectsTypeName = errorCode is AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer or 24AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesFramework;
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (5)
84case AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToLoadAnalyzer: 89case AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer: 94case AnalyzerLoadFailureEventArgs.FailureErrorCode.NoAnalyzers: 99case AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesFramework: 104case AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesNewerCompiler:
Microsoft.CodeAnalysis.UnitTests (6)
Analyzers\AnalyzerFileReferenceTests.cs (6)
156var failedTypes = errors.Where(e => e.ErrorCode == AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer).Select(e => e.TypeName); 175Assert.Equal(AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToLoadAnalyzer, errors.First().ErrorCode); 252Assert.Equal(AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer, errors.First().ErrorCode); 273Assert.Equal(AnalyzerLoadFailureEventArgs.FailureErrorCode.UnableToCreateAnalyzer, error.ErrorCode); 293Assert.Equal(AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesNewerCompiler, error.ErrorCode); 461Assert.Equal(AnalyzerLoadFailureEventArgs.FailureErrorCode.ReferencesFramework, errors.First().ErrorCode);