26 references to AddDiagnostic
ILLink.RoslynAnalyzer (26)
RequiresAnalyzerBase.cs (1)
252
diagnosticContext.
AddDiagnostic
(RequiresDiagnosticId, member.GetDisplayName(), message, url);
RequiresAssemblyFilesAnalyzer.cs (2)
117
diagnosticContext.
AddDiagnostic
(DiagnosticId.AvoidAssemblyGetFilesInSingleFile, member.GetDisplayName());
123
diagnosticContext.
AddDiagnostic
(DiagnosticId.AvoidAssemblyLocationInSingleFile, member.GetDisplayName());
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (13)
380
_diagnosticContext.
AddDiagnostic
(DiagnosticId.UnrecognizedTypeInRuntimeHelpersRunClassConstructor, calledMethod.GetDisplayName());
884
_diagnosticContext.
AddDiagnostic
(DiagnosticId.PropertyAccessorParameterInLinqExpressionsCannotBeStaticallyDetermined,
981
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericMethod, calledMethod.GetDisplayName());
994
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericMethod, calledMethod.GetDisplayName());
1053
_diagnosticContext.
AddDiagnostic
(DiagnosticId.CaseInsensitiveTypeGetTypeCallIsNotSupported, calledMethod.GetDisplayName());
1085
_diagnosticContext.
AddDiagnostic
(DiagnosticId.UnrecognizedTypeNameInTypeGetType, calledMethod.GetDisplayName());
1165
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericType, calledMethod.GetDisplayName());
1177
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericType, calledMethod.GetDisplayName());
1364
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericMethod, calledMethod.GetDisplayName());
1519
_diagnosticContext.
AddDiagnostic
(DiagnosticId.ParametersOfAssemblyCreateInstanceCannotBeAnalyzed, calledMethod.GetDisplayName());
1657
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericMethod, reflectionMethod.GetDisplayName());
1720
_diagnosticContext.
AddDiagnostic
(DiagnosticId.UnrecognizedParameterInMethodCreateInstance, new ParameterProxy(calledMethod, (ParameterIndex)1 + offset).GetDisplayName(), calledMethod.GetDisplayName());
1726
_diagnosticContext.
AddDiagnostic
(DiagnosticId.UnrecognizedParameterInMethodCreateInstance, new ParameterProxy(calledMethod, (ParameterIndex)0 + offset).GetDisplayName(), calledMethod.GetDisplayName());
src\tools\illink\src\ILLink.Shared\TrimAnalysis\RequireDynamicallyAccessedMembersAction.cs (1)
89
_diagnosticContext.
AddDiagnostic
(diagnosticId, targetValue.GetDiagnosticArgumentsForAnnotationMismatch().ToArray());
TrimAnalysis\FeatureCheckReturnValuePattern.cs (2)
43
diagnosticContext.
AddDiagnostic
(
64
diagnosticContext.
AddDiagnostic
(
TrimAnalysis\HandleCallAction.cs (1)
200
_diagnosticContext.
AddDiagnostic
(DiagnosticId.TypeMapGroupTypeCannotBeStaticallyDetermined,
TrimAnalysis\ReflectionAccessAnalyzer.cs (6)
93
diagnosticContext.
AddDiagnostic
(DiagnosticId.RequiresUnreferencedCode, member.GetDisplayName(), message, url);
147
diagnosticContext.
AddDiagnostic
(id, _typeHierarchyType!.GetDisplayName(),
156
diagnosticContext.
AddDiagnostic
(id, _typeHierarchyType!.GetDisplayName(), member.GetDisplayName());
165
diagnosticContext.
AddDiagnostic
(DiagnosticId.DynamicallyAccessedMembersMethodAccessedViaReflection, methodSymbol.GetDisplayName());
173
diagnosticContext.
AddDiagnostic
(DiagnosticId.DynamicallyAccessedMembersMethodAccessedViaReflection, methodSymbol.GetDisplayName());
212
diagnosticContext.
AddDiagnostic
(DiagnosticId.DynamicallyAccessedMembersFieldAccessedViaReflection, fieldSymbol.GetDisplayName());