41 references to GeneratorDiagnostics
Microsoft.Interop.LibraryImportGenerator (41)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (1)
25
public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(
GeneratorDiagnostics
.Ids.TypeNotSupported);
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (25)
26
GeneratorDiagnostics
.InvalidAttributedMethodSignature,
27
GeneratorDiagnostics
.InvalidAttributedMethodContainingTypeMissingModifiers,
28
GeneratorDiagnostics
.InvalidStringMarshallingConfiguration,
29
GeneratorDiagnostics
.ParameterTypeNotSupported,
30
GeneratorDiagnostics
.ReturnTypeNotSupported,
31
GeneratorDiagnostics
.ParameterTypeNotSupportedWithDetails,
32
GeneratorDiagnostics
.ReturnTypeNotSupportedWithDetails,
33
GeneratorDiagnostics
.ParameterConfigurationNotSupported,
34
GeneratorDiagnostics
.ReturnConfigurationNotSupported,
35
GeneratorDiagnostics
.MarshalAsParameterConfigurationNotSupported,
36
GeneratorDiagnostics
.MarshalAsReturnConfigurationNotSupported,
37
GeneratorDiagnostics
.ConfigurationNotSupported,
38
GeneratorDiagnostics
.ConfigurationValueNotSupported,
39
GeneratorDiagnostics
.MarshallingAttributeConfigurationNotSupported,
40
GeneratorDiagnostics
.CannotForwardToDllImport,
41
GeneratorDiagnostics
.RequiresAllowUnsafeBlocks,
42
GeneratorDiagnostics
.UnnecessaryParameterMarshallingInfo,
43
GeneratorDiagnostics
.UnnecessaryReturnMarshallingInfo,
44
GeneratorDiagnostics
.SizeOfInCollectionMustBeDefinedAtCallOutParam,
45
GeneratorDiagnostics
.SizeOfInCollectionMustBeDefinedAtCallReturnValue,
46
GeneratorDiagnostics
.LibraryImportUsageDoesNotFollowBestPractices);
83
endContext.ReportDiagnostic(DiagnosticInfo.Create(
GeneratorDiagnostics
.RequiresAllowUnsafeBlocks, null).ToDiagnostic());
282
return DiagnosticInfo.Create(
GeneratorDiagnostics
.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name);
288
return DiagnosticInfo.Create(
GeneratorDiagnostics
.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, nonPartialIdentifier);
294
return DiagnosticInfo.Create(
GeneratorDiagnostics
.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
DiagnosticDescriptorProvider.cs (12)
11
public DiagnosticDescriptor InvalidMarshallingAttributeInfo =>
GeneratorDiagnostics
.MarshallingAttributeConfigurationNotSupported;
13
public DiagnosticDescriptor ConfigurationNotSupported =>
GeneratorDiagnostics
.ConfigurationNotSupported;
15
public DiagnosticDescriptor ConfigurationValueNotSupported =>
GeneratorDiagnostics
.ConfigurationValueNotSupported;
21
GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: true, MarshallingAttributeInfo: MarshalAsInfo } } =>
GeneratorDiagnostics
.MarshalAsReturnConfigurationNotSupported,
22
GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: false, MarshallingAttributeInfo: MarshalAsInfo } } =>
GeneratorDiagnostics
.MarshalAsParameterConfigurationNotSupported,
23
GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: true } =>
GeneratorDiagnostics
.ReturnTypeNotSupportedWithDetails,
24
GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: false } =>
GeneratorDiagnostics
.ParameterTypeNotSupportedWithDetails,
25
GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: false } =>
GeneratorDiagnostics
.UnnecessaryParameterMarshallingInfo,
26
GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: true } =>
GeneratorDiagnostics
.UnnecessaryReturnMarshallingInfo,
27
GeneratorDiagnostic.NotRecommended =>
GeneratorDiagnostics
.LibraryImportUsageDoesNotFollowBestPractices,
29
{ TypePositionInfo.IsManagedReturnPosition: true } =>
GeneratorDiagnostics
.ReturnTypeNotSupported,
30
{ TypePositionInfo.IsManagedReturnPosition: false } =>
GeneratorDiagnostics
.ParameterTypeNotSupported,
GeneratorDiagnostics.cs (3)
133
GeneratorDiagnostics
.Ids.ConfigurationNotSupported,
144
GeneratorDiagnostics
.Ids.ConfigurationNotSupported,
281
GeneratorDiagnostics
.InvalidStringMarshallingConfiguration,