3 types derived from GeneratorDiagnostic
Microsoft.Interop.SourceGeneration (3)
Marshalling\GeneratorDiagnostic.cs (3)
28public sealed record NotSupported(TypePositionInfo TypePositionInfo) : GeneratorDiagnostic(TypePositionInfo, isFatal: true) 45public sealed record UnnecessaryData(TypePositionInfo TypePositionInfo, ImmutableArray<Location> UnnecessaryDataLocations) : GeneratorDiagnostic(TypePositionInfo, isFatal: false) 64public sealed record NotRecommended(TypePositionInfo TypePositionInfo) : GeneratorDiagnostic(TypePositionInfo, isFatal: false)
82 references to GeneratorDiagnostic
Microsoft.Interop.ComInterfaceGenerator (14)
DiagnosticDescriptorProvider.cs (8)
19public DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic) 23GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: true, MarshallingAttributeInfo: MarshalAsInfo } } => GeneratorDiagnostics.MarshalAsReturnConfigurationNotSupported, 24GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: false, MarshallingAttributeInfo: MarshalAsInfo } } => GeneratorDiagnostics.MarshalAsParameterConfigurationNotSupported, 25GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails, 26GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, 27GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo, 28GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.UnnecessaryReturnMarshallingInfo, 29GeneratorDiagnostic.NotRecommended => GeneratorDiagnostics.GeneratedComInterfaceUsageDoesNotFollowBestPractices,
Marshallers\ComInterfaceDispatchMarshallingResolver.cs (1)
67public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshallers\KeepAliveThisMarshaller.cs (1)
35public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (2)
58public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic) 95public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshallers\ObjectUnwrapperResolver.cs (1)
62public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshallers\StructAsHResultMarshallerFactory.cs (1)
94public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Microsoft.Interop.JavaScript.JSImportGenerator (7)
DescriptorProvider.cs (3)
16public DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic) 20GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails, 21GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails,
JSExportCodeGenerator.cs (1)
59diagnosticsBag.ReportGeneratorDiagnostic(new GeneratorDiagnostic.NotSupported(spanArg.TypeInfo)
JSImportCodeGenerator.cs (1)
66diagnosticsBag.ReportGeneratorDiagnostic(new GeneratorDiagnostic.NotSupported(spanArg.TypeInfo)
Marshaling\BaseJSGenerator.cs (1)
36public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic)
Marshaling\EmptyJSGenerator.cs (1)
16public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Microsoft.Interop.LibraryImportGenerator (8)
DiagnosticDescriptorProvider.cs (8)
17public DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic) 21GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: true, MarshallingAttributeInfo: MarshalAsInfo } } => GeneratorDiagnostics.MarshalAsReturnConfigurationNotSupported, 22GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: false, MarshallingAttributeInfo: MarshalAsInfo } } => GeneratorDiagnostics.MarshalAsParameterConfigurationNotSupported, 23GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails, 24GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, 25GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo, 26GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.UnnecessaryReturnMarshallingInfo, 27GeneratorDiagnostic.NotRecommended => GeneratorDiagnostics.LibraryImportUsageDoesNotFollowBestPractices,
Microsoft.Interop.LibraryImportGenerator.Downlevel (8)
DiagnosticDescriptorProvider.cs (8)
17public DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic) 21GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: true, MarshallingAttributeInfo: MarshalAsInfo } } => GeneratorDiagnostics.MarshalAsReturnConfigurationNotSupported, 22GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: false, MarshallingAttributeInfo: MarshalAsInfo } } => GeneratorDiagnostics.MarshalAsParameterConfigurationNotSupported, 23GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails, 24GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, 25GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo, 26GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.UnnecessaryReturnMarshallingInfo, 27GeneratorDiagnostic.NotRecommended => GeneratorDiagnostics.LibraryImportUsageDoesNotFollowBestPractices,
Microsoft.Interop.SourceGeneration (45)
BoundGenerators.cs (3)
21public static BoundGenerators Create(ImmutableArray<TypePositionInfo> elementTypeInfo, IMarshallingGeneratorResolver generatorResolver, StubCodeContext context, IUnboundMarshallingGenerator fallbackGenerator, out ImmutableArray<GeneratorDiagnostic> generatorBindingDiagnostics) 29ImmutableArray<GeneratorDiagnostic>.Builder generatorDiagnostics = ImmutableArray.CreateBuilder<GeneratorDiagnostic>();
GeneratorDiagnosticsBag.cs (3)
94public void ReportGeneratorDiagnostic(GeneratorDiagnostic diagnostic) 113public void ReportGeneratorDiagnostics(ImmutableArray<GeneratorDiagnostic> diagnostics) 115foreach (var diagnostic in diagnostics)
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (10)
53private record struct ExpressionOrNotSupported(ExpressionSyntax? Expression, GeneratorDiagnostic.NotSupported? NotSupported) 59public ExpressionOrNotSupported(GeneratorDiagnostic.NotSupported notSupportedDiagnostic) 65private GeneratorDiagnostic.NotSupported? ValidateCountInfo(TypePositionInfo info, CountInfo count, StubCodeContext context, out bool countInfoRequiresCast) 74_ => new GeneratorDiagnostic.NotSupported(info) 80GeneratorDiagnostic.NotSupported? ValidateNumElementsExpression(TypePositionInfo paramInfo, out bool requiresCast) 96return new GeneratorDiagnostic.NotSupported(info) 105return new GeneratorDiagnostic.NotSupported(info) 146if (ValidateCustomNativeTypeMarshallingSupported(info, context, marshalInfo) is GeneratorDiagnostic.NotSupported diagnostic) 234GeneratorDiagnostic.NotSupported? countInfoDiagnostic = ValidateCountInfo(info, countInfo, context, out countInfoRequiresCast); 417private GeneratorDiagnostic.NotSupported? ValidateCustomNativeTypeMarshallingSupported(TypePositionInfo info, StubCodeContext context, NativeMarshallingAttributeInfo marshalInfo)
Marshalling\BlittableMarshaller.cs (1)
102public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshalling\BlittableMarshallerResolver.cs (1)
34context, new GeneratorDiagnostic.NotSupported(info)
Marshalling\BoolMarshaller.cs (1)
100public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshalling\BreakingChangeDetector.cs (1)
32new GeneratorDiagnostic.NotRecommended(info)
Marshalling\ByValueContentsMarshalKindValidator.cs (1)
37var support = generator.Generator.SupportsByValueMarshalKind(generator.Generator.TypeInfo.ByValueContentsMarshalKind, out GeneratorDiagnostic? diagnostic);
Marshalling\ByValueMarshalKindSupportDescriptor.cs (8)
12public ByValueMarshalKindSupport GetSupport(TypePositionInfo info, out GeneratorDiagnostic? diagnostic) 18new GeneratorDiagnostic.NotRecommended(info) 23new GeneratorDiagnostic.UnnecessaryData( 31new GeneratorDiagnostic.NotSupported(info) 42/// Provides an implementation of <see cref="IUnboundMarshallingGenerator.SupportsByValueMarshalKind(ByValueContentsMarshalKind, TypePositionInfo, out GeneratorDiagnostic?)"/> through <see cref="GetSupport(ByValueContentsMarshalKind, TypePositionInfo, out GeneratorDiagnostic?)"/> 71public ByValueMarshalKindSupport GetSupport(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic) 78diagnostic = new GeneratorDiagnostic.NotSupported(info)
Marshalling\CharMarshaller.cs (1)
137public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshalling\CustomTypeMarshallingGenerator.cs (1)
99public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic)
Marshalling\DelegateMarshaller.cs (1)
95public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshalling\Forwarder.cs (1)
34public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshalling\MarshallingGenerator.cs (2)
148ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic); 174public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic)
Marshalling\ResolvedGenerator.cs (6)
10public record struct ResolvedGenerator([property: MemberNotNullWhen(true, nameof(ResolvedGenerator.IsResolved), nameof(ResolvedGenerator.IsResolvedWithoutErrors))] IBoundMarshallingGenerator? Generator, ImmutableArray<GeneratorDiagnostic> Diagnostics) 22return new(generator, ImmutableArray<GeneratorDiagnostic>.Empty); 25public static ResolvedGenerator NotSupported(TypePositionInfo info, StubCodeContext context, GeneratorDiagnostic.NotSupported notSupportedDiagnostic) 27return new(s_forwarder.Bind(info, context), ImmutableArray.Create<GeneratorDiagnostic>(notSupportedDiagnostic)); 30public static ResolvedGenerator ResolvedWithDiagnostics(IBoundMarshallingGenerator generator, ImmutableArray<GeneratorDiagnostic> diagnostics) 35public static ResolvedGenerator UnresolvedGenerator { get; } = new(null, ImmutableArray<GeneratorDiagnostic>.Empty);
Marshalling\StaticPinnableManagedValueMarshaller.cs (1)
99public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic)
MethodSignatureDiagnosticLocations.cs (3)
37DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic); 42DiagnosticInfo CreateDiagnosticInfo(DiagnosticDescriptor descriptor, GeneratorDiagnostic diagnostic); 61public DiagnosticInfo CreateDiagnosticInfo(DiagnosticDescriptor descriptor, GeneratorDiagnostic diagnostic)