50 references to GeneratorDiagnostics
Microsoft.Interop.ComInterfaceGenerator (50)
Analyzers\AddMarshalAsToElementFixer.cs (1)
20public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(GeneratorDiagnostics.Ids.NotRecommendedGeneratedComInterfaceUsage);
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (2)
21= ImmutableArray.Create(GeneratorDiagnostics.InterfaceTypeNotSupported); 44context.ReportDiagnostic(comInterfaceAttribute.CreateDiagnosticInfo(GeneratorDiagnostics.InterfaceTypeNotSupported, unsupportedValue).ToDiagnostic());
ComClassInfo.cs (3)
30return DiagnosticOr<ComClassInfo>.From(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, syntax.Identifier.GetLocation())); 37GeneratorDiagnostics.InvalidAttributedClassMissingPartialModifier, 58return DiagnosticOr<ComClassInfo>.From(DiagnosticInfo.Create(GeneratorDiagnostics.ClassDoesNotImplementAnyGeneratedComInterface,
ComInterfaceContext.cs (1)
72GeneratorDiagnostics.BaseInterfaceIsNotGenerated,
ComInterfaceGenerator.cs (4)
308generatorDiagnostics.ReportDiagnostic(DiagnosticInfo.Create(GeneratorDiagnostics.ComMethodManagedReturnWillBeOutVariable, symbol.Locations[0])); 345GeneratorDiagnostics.HResultTypeWillBeTreatedAsStruct, 363GeneratorDiagnostics.SizeOfInCollectionMustBeDefinedAtCallOutParam, 364GeneratorDiagnostics.SizeOfInCollectionMustBeDefinedAtCallReturnValue);
ComInterfaceInfo.cs (13)
58return DiagnosticOrInterfaceInfo.From(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, syntax.Identifier.GetLocation())); 65GeneratorDiagnostics.InvalidAttributedInterfaceGenericNotSupported, 76GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible, 125GeneratorDiagnostics.BaseInterfaceDefinedInOtherAssembly, 182GeneratorDiagnostics.InvalidAttributedInterfaceMissingPartialModifiers, 207GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, 216GeneratorDiagnostics.StringMarshallingCustomTypeNotAccessibleByGeneratedCode, 226GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, 241GeneratorDiagnostics.InvalidStringMarshallingMismatchBetweenBaseAndDerived, 263GeneratorDiagnostics.InvalidOptionsOnInterface, 277GeneratorDiagnostics.InvalidOptionsOnInterface, 310GeneratorDiagnostics.MultipleComInterfaceBaseTypes, 352GeneratorDiagnostics.InvalidAttributedInterfaceMissingGuidAttribute,
ComMethodInfo.cs (6)
53methods.Add(DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(member.CreateDiagnosticInfo(GeneratorDiagnostics.InstancePropertyDeclaredInInterface, member.Name, data.ifaceSymbol.ToDisplayString()))); 56methods.Add(DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(member.CreateDiagnosticInfo(GeneratorDiagnostics.InstanceEventDeclaredInInterface, member.Name, data.ifaceSymbol.ToDisplayString()))); 74return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, comMethodDeclaringSyntax.Identifier.GetLocation(), method.Name); 80return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, comMethodDeclaringSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); 119return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(DiagnosticInfo.Create(GeneratorDiagnostics.MethodNotDeclaredInAttributedInterface, method.Locations.FirstOrDefault(), method.ToDisplayString())); 135return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(DiagnosticInfo.Create(GeneratorDiagnostics.CannotAnalyzeMethodPattern, method.Locations.FirstOrDefault(), method.ToDisplayString()));
DiagnosticDescriptorProvider.cs (12)
13public DiagnosticDescriptor InvalidMarshallingAttributeInfo => GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported; 15public DiagnosticDescriptor ConfigurationNotSupported => GeneratorDiagnostics.ConfigurationNotSupported; 17public DiagnosticDescriptor ConfigurationValueNotSupported => GeneratorDiagnostics.ConfigurationValueNotSupported; 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, 31{ TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.ReturnTypeNotSupported, 32{ TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.ParameterTypeNotSupported,
GeneratorDiagnostics.cs (4)
224GeneratorDiagnostics.Ids.ConfigurationNotSupported, 235GeneratorDiagnostics.Ids.ConfigurationNotSupported, 525GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnMethod, 543GeneratorDiagnostics.InvalidExceptionMarshallingConfiguration,
VtableIndexStubGenerator.cs (4)
400return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 408return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 415return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); 421return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute, methodSyntax.Identifier.GetLocation(), method.Name);