26 references to CreateAndReportDiagnostic
Microsoft.Interop.LibraryImportGenerator (26)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (20)
653
managedTypeReporter.
CreateAndReportDiagnostic
(ManagedTypeMustBeNonNullRule, entryType.ToDisplayString());
665
(entryType, managedType) => managedTypeReporter.
CreateAndReportDiagnostic
(ManagedTypeMustBeClosedOrMatchArityRule, managedType, entryType), out ITypeSymbol managedType))
674
marshallerTypeReporter.
CreateAndReportDiagnostic
(MarshallerTypeMustBeNonNullRule, entryType.ToDisplayString());
683
(entryType, marshallerType) => marshallerTypeReporter.
CreateAndReportDiagnostic
(MarshallerTypeMustBeClosedOrMatchArityRule, marshallerType, entryType),
693
marshalModeReporter.
CreateAndReportDiagnostic
(MarshalModeMustBeValidValue);
720
diagnosticReporter.
CreateAndReportDiagnostic
(MarshallerTypeMustBeStaticClassOrStructRule, marshallerType.ToDisplayString());
889
diagnosticReporter.
CreateAndReportDiagnostic
(UnmanagedTypeMustBeUnmanagedRule, toUnmanagedMethod.ToDisplayString());
896
diagnosticReporter.
CreateAndReportDiagnostic
(FirstParameterMustMatchReturnTypeRule, methods.UnmanagedValuesDestination.ToDisplayString(), toUnmanagedMethod.ToDisplayString());
905
diagnosticReporter.
CreateAndReportDiagnostic
(ReturnTypesMustMatchRule, methods.ToUnmanaged.ToDisplayString(), methods.ToUnmanagedWithBuffer.ToDisplayString());
918
diagnosticReporter.
CreateAndReportDiagnostic
(FirstParameterMustMatchReturnTypeRule, toManagedMethod.ToDisplayString(), (methods.ToUnmanaged ?? methods.ToUnmanagedWithBuffer).ToDisplayString());
927
diagnosticReporter.
CreateAndReportDiagnostic
(FirstParametersMustMatchRule, methods.UnmanagedValuesSource.ToDisplayString(), toManagedMethod.ToDisplayString());
936
diagnosticReporter.
CreateAndReportDiagnostic
(FirstParametersMustMatchRule, methods.ToManaged.ToDisplayString(), methods.ToManagedFinally.ToDisplayString());
951
diagnosticReporter.
CreateAndReportDiagnostic
(ElementTypesOfReturnTypesMustMatchRule, methods.ManagedValuesSource.ToDisplayString(), methods.ManagedValuesDestination.ToDisplayString());
969
diagnosticReporter.
CreateAndReportDiagnostic
(ReturnTypeMustBeExpectedTypeRule, unmanagedValuesCollectionMethod.ToDisplayString(), expectedSpanType.Construct(expectedElementType).ToDisplayString());
1015
diagnosticReporter.
CreateAndReportDiagnostic
(ElementMarshallerCannotBeStatefulRule, marshallerType.ToDisplayString(), mode);
1148
diagnosticReporter.
CreateAndReportDiagnostic
(
1205
diagnosticReporter.
CreateAndReportDiagnostic
(UnmanagedTypeMustBeUnmanagedRule, methods.ToUnmanaged.ToDisplayString());
1216
diagnosticReporter.
CreateAndReportDiagnostic
(FirstParameterMustMatchReturnTypeRule, fromUnmanagedMethod.ToDisplayString(), methods.ToUnmanaged.ToDisplayString());
1224
diagnosticReporter.
CreateAndReportDiagnostic
(UnmanagedTypeMustBeUnmanagedRule, fromUnmanagedMethod.ToDisplayString());
1239
diagnosticReporter.
CreateAndReportDiagnostic
(ElementTypesOfReturnTypesMustMatchRule, methods.ManagedValuesSource.ToDisplayString(), methods.ManagedValuesDestination.ToDisplayString());
Analyzers\NativeMarshallingAttributeAnalyzer.cs (6)
94
diagnosticFactory.
CreateAndReportDiagnostic
(
115
diagnosticFactory.
CreateAndReportDiagnostic
(
127
diagnosticFactory.
CreateAndReportDiagnostic
(
137
(managedType, entryType) => diagnosticFactory.
CreateAndReportDiagnostic
(
153
diagnosticFactory.
CreateAndReportDiagnostic
(
158
diagnosticFactory.
CreateAndReportDiagnostic
(