33 references to FailureErrorCode
Microsoft.CodeAnalysis (18)
CommandLine\CommandLineArguments.cs (6)
490
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.UnableToLoadAnalyzer:
493
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.UnableToCreateAnalyzer:
496
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.NoAnalyzers:
499
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.ReferencesFramework:
502
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.ReferencesNewerCompiler:
505
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.None:
DiagnosticAnalyzer\AnalyzerFileReference.cs (7)
205
var
errorCode = (typeName != null) ?
206
AnalyzerLoadFailureEventArgs.
FailureErrorCode
.UnableToCreateAnalyzer :
207
AnalyzerLoadFailureEventArgs.
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 });
616
AnalyzerLoadFailureEventArgs.
FailureErrorCode
.ReferencesFramework,
DiagnosticAnalyzer\AnalyzerLoadFailureEventArgs.cs (5)
34
public
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.
46
public AnalyzerLoadFailureEventArgs(
FailureErrorCode
errorCode, string message, Exception? exceptionOpt = null, string? typeNameOpt = null)
48
if (errorCode <=
FailureErrorCode
.None || errorCode >
FailureErrorCode
.ReferencesNewerCompiler)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Diagnostics\AnalyzerLoadFailureTests.cs (4)
14
AnalyzerLoadFailureEventArgs.
FailureErrorCode
errorCode,
18
if (errorCode == AnalyzerLoadFailureEventArgs.
FailureErrorCode
.None)
23
var expectsTypeName = errorCode is AnalyzerLoadFailureEventArgs.
FailureErrorCode
.UnableToCreateAnalyzer or
24
AnalyzerLoadFailureEventArgs.
FailureErrorCode
.ReferencesFramework;
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (5)
84
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.UnableToLoadAnalyzer:
89
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.UnableToCreateAnalyzer:
94
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.NoAnalyzers:
99
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.ReferencesFramework:
104
case AnalyzerLoadFailureEventArgs.
FailureErrorCode
.ReferencesNewerCompiler:
Microsoft.CodeAnalysis.UnitTests (6)
Analyzers\AnalyzerFileReferenceTests.cs (6)
156
var failedTypes = errors.Where(e => e.ErrorCode == AnalyzerLoadFailureEventArgs.
FailureErrorCode
.UnableToCreateAnalyzer).Select(e => e.TypeName);
175
Assert.Equal(AnalyzerLoadFailureEventArgs.
FailureErrorCode
.UnableToLoadAnalyzer, errors.First().ErrorCode);
252
Assert.Equal(AnalyzerLoadFailureEventArgs.
FailureErrorCode
.UnableToCreateAnalyzer, errors.First().ErrorCode);
273
Assert.Equal(AnalyzerLoadFailureEventArgs.
FailureErrorCode
.UnableToCreateAnalyzer, error.ErrorCode);
293
Assert.Equal(AnalyzerLoadFailureEventArgs.
FailureErrorCode
.ReferencesNewerCompiler, error.ErrorCode);
461
Assert.Equal(AnalyzerLoadFailureEventArgs.
FailureErrorCode
.ReferencesFramework, errors.First().ErrorCode);