4 instantiations of DiagnosticReporter
Microsoft.Interop.LibraryImportGenerator (4)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (3)
729
DiagnosticReporter trackingReporter = new
DiagnosticReporter
((descriptor, properties, args) =>
977
return new
DiagnosticReporter
((descriptor, properties, args) => trackingReporter.CreateAndReportDiagnostic(DefaultMarshalModeDiagnostics.GetDefaultMarshalModeDiagnostic(descriptor), properties, args));
1023
DiagnosticReporter trackingReporter = new
DiagnosticReporter
((descriptor, properties, args) =>
Analyzers\DiagnosticReporter.cs (1)
19
public static DiagnosticReporter CreateForLocation(Location location, Action<Diagnostic> reportDiagnostic) =>
new
((descriptor, properties, args) => reportDiagnostic(location.CreateDiagnosticInfo(descriptor, properties, args).ToDiagnostic()));
28 references to DiagnosticReporter
Microsoft.Interop.LibraryImportGenerator (28)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (23)
652
DiagnosticReporter
managedTypeReporter =
DiagnosticReporter
.CreateForLocation(managedTypeArgument.Value.Syntax.GetLocation(), context.ReportDiagnostic);
657
DiagnosticReporter
managedTypeReporter =
DiagnosticReporter
.CreateForLocation(((TypeOfExpressionSyntax)managedTypeOfOp.Syntax).Type.GetLocation(), context.ReportDiagnostic);
673
DiagnosticReporter
marshallerTypeReporter =
DiagnosticReporter
.CreateForLocation(marshallerTypeArgument.Value.Syntax.GetLocation(), context.ReportDiagnostic);
678
DiagnosticReporter
marshallerTypeReporter =
DiagnosticReporter
.CreateForLocation(((TypeOfExpressionSyntax)marshallerTypeOfOp.Syntax).Type.GetLocation(), context.ReportDiagnostic);
692
DiagnosticReporter
marshalModeReporter =
DiagnosticReporter
.CreateForLocation(marshalModeArgument.Syntax.GetLocation(), context.ReportDiagnostic);
708
private void AnalyzeMarshallerType(
DiagnosticReporter
diagnosticReporter, ITypeSymbol managedType, MarshalMode mode, INamedTypeSymbol marshallerType, bool isLinearCollectionMarshaller)
724
private void AnalyzeStatelessMarshallerType(
DiagnosticReporter
diagnosticReporter, ITypeSymbol managedType, MarshalMode mode, INamedTypeSymbol marshallerType, bool isLinearCollectionMarshaller)
729
DiagnosticReporter
trackingReporter = new DiagnosticReporter((descriptor, properties, args) =>
744
void ReportDiagnosticsForMissingMembers(
DiagnosticReporter
diagnosticReporter)
876
void ReportDiagnosticsForMismatchedMemberSignatures(
DiagnosticReporter
diagnosticReporter)
963
private void VerifyUnmanagedCollectionElementType(
DiagnosticReporter
diagnosticReporter, IMethodSymbol? unmanagedValuesCollectionMethod, ITypeSymbol expectedElementType, INamedTypeSymbol expectedSpanType)
973
private static
DiagnosticReporter
AdaptReporterForMarshalMode(
DiagnosticReporter
trackingReporter, MarshalMode mode)
983
private static void CheckForBufferSizeMember(
DiagnosticReporter
diagnosticReporter, DiagnosticDescriptor descriptor, INamedTypeSymbol marshallerType, IMethodSymbol callerAllocatedBufferMethod)
1008
private void AnalyzeStatefulMarshallerType(
DiagnosticReporter
diagnosticReporter, ITypeSymbol managedType, MarshalMode mode, INamedTypeSymbol marshallerType, bool isLinearCollectionMarshaller)
1023
DiagnosticReporter
trackingReporter = new DiagnosticReporter((descriptor, properties, args) =>
1038
void ReportDiagnosticsForMissingMembers(
DiagnosticReporter
diagnosticReporter)
1193
void ReportDiagnosticsForMismatchedMemberSignatures(
DiagnosticReporter
diagnosticReporter)
Analyzers\DiagnosticReporter.cs (1)
19
public static
DiagnosticReporter
CreateForLocation(Location location, Action<Diagnostic> reportDiagnostic) => new((descriptor, properties, args) => reportDiagnostic(location.CreateDiagnosticInfo(descriptor, properties, args).ToDiagnostic()));
Analyzers\NativeMarshallingAttributeAnalyzer.cs (4)
93
DiagnosticReporter
diagnosticFactory =
DiagnosticReporter
.CreateForLocation(marshallerEntryPointTypeArgument.Value.Syntax.GetLocation(), context.ReportDiagnostic);
102
DiagnosticReporter
.CreateForLocation(((TypeOfExpressionSyntax)typeOfOp.Syntax).Type.GetLocation(), context.ReportDiagnostic),
110
DiagnosticReporter
diagnosticFactory,