6 instantiations of AnalyzerLoadFailureEventArgs
Microsoft.CodeAnalysis (5)
DiagnosticAnalyzer\AnalyzerFileReference.cs (5)
209
return 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)
27
var eventArgs = new
AnalyzerLoadFailureEventArgs
(
59 references to AnalyzerLoadFailureEventArgs
CodeStyleConfigFileGenerator (1)
Program.cs (1)
80
static void AnalyzerFileReference_AnalyzerLoadFailed(object? sender,
AnalyzerLoadFailureEventArgs
e)
Microsoft.CodeAnalysis (15)
CommandLine\CommandLineArguments.cs (7)
483
EventHandler<
AnalyzerLoadFailureEventArgs
> errorHandler = (o, e) =>
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 (8)
46
public event EventHandler<
AnalyzerLoadFailureEventArgs
>? AnalyzerLoadFailed;
200
private static
AnalyzerLoadFailureEventArgs
CreateAnalyzerFailedArgs(Exception e, string? 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,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
Diagnostics\AnalyzerLoadFailureTests.cs (5)
14
AnalyzerLoadFailureEventArgs
.FailureErrorCode errorCode,
18
if (errorCode ==
AnalyzerLoadFailureEventArgs
.FailureErrorCode.None)
23
var expectsTypeName = errorCode is
AnalyzerLoadFailureEventArgs
.FailureErrorCode.UnableToCreateAnalyzer or
24
AnalyzerLoadFailureEventArgs
.FailureErrorCode.ReferencesFramework;
27
var
eventArgs = new AnalyzerLoadFailureEventArgs(
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
ExternalAccess\VSMac\AnalyzerHelper.cs (1)
11
public static DiagnosticData CreateAnalyzerLoadFailureDiagnostic(
AnalyzerLoadFailureEventArgs
e, string fullPath, ProjectId? projectId, string? language)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (7)
75
public static DiagnosticData CreateAnalyzerLoadFailureDiagnostic(
AnalyzerLoadFailureEventArgs
e, string fullPath, ProjectId? projectId, string? language)
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:
106
message = 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)
147
List<
AnalyzerLoadFailureEventArgs
> errors = new List<
AnalyzerLoadFailureEventArgs
>();
148
EventHandler<
AnalyzerLoadFailureEventArgs
> errorHandler = (o, e) => errors.Add(e);
156
var failedTypes = errors.Where(e => e.ErrorCode ==
AnalyzerLoadFailureEventArgs
.FailureErrorCode.UnableToCreateAnalyzer).Select(e => e.TypeName);
166
List<
AnalyzerLoadFailureEventArgs
> errors = new List<
AnalyzerLoadFailureEventArgs
>();
167
EventHandler<
AnalyzerLoadFailureEventArgs
> errorHandler = (o, e) => errors.Add(e);
175
Assert.Equal(
AnalyzerLoadFailureEventArgs
.FailureErrorCode.UnableToLoadAnalyzer, errors.First().ErrorCode);
183
List<
AnalyzerLoadFailureEventArgs
> errors = new List<
AnalyzerLoadFailureEventArgs
>();
184
EventHandler<
AnalyzerLoadFailureEventArgs
> errorHandler = (o, e) => errors.Add(e);
243
List<
AnalyzerLoadFailureEventArgs
> errors = new List<
AnalyzerLoadFailureEventArgs
>();
244
EventHandler<
AnalyzerLoadFailureEventArgs
> errorHandler = (o, e) => errors.Add(e);
252
Assert.Equal(
AnalyzerLoadFailureEventArgs
.FailureErrorCode.UnableToCreateAnalyzer, errors.First().ErrorCode);
261
List<
AnalyzerLoadFailureEventArgs
> errors = new List<
AnalyzerLoadFailureEventArgs
>();
262
EventHandler<
AnalyzerLoadFailureEventArgs
> errorHandler = (o, e) => errors.Add(e);
270
var
error = errors[0];
273
Assert.Equal(
AnalyzerLoadFailureEventArgs
.FailureErrorCode.UnableToCreateAnalyzer, error.ErrorCode);
283
List<
AnalyzerLoadFailureEventArgs
> errors = new List<
AnalyzerLoadFailureEventArgs
>();
284
EventHandler<
AnalyzerLoadFailureEventArgs
> errorHandler = (o, e) => errors.Add(e);
292
var
error = errors[0];
293
Assert.Equal(
AnalyzerLoadFailureEventArgs
.FailureErrorCode.ReferencesNewerCompiler, error.ErrorCode);
461
Assert.Equal(
AnalyzerLoadFailureEventArgs
.FailureErrorCode.ReferencesFramework, errors.First().ErrorCode);
463
List<
AnalyzerLoadFailureEventArgs
> buildAndLoadGeneratorAndReturnAnyErrors(string? targetFramework)
494
List<
AnalyzerLoadFailureEventArgs
> errors = new List<
AnalyzerLoadFailureEventArgs
>();
495
void errorHandler(object? o,
AnalyzerLoadFailureEventArgs
e) => errors.Add(e);