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