112 references to GeneratorDiagnostics
Microsoft.Interop.ComInterfaceGenerator (112)
Analyzers\AddMarshalAsToElementFixer.cs (1)
20public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(GeneratorDiagnostics.Ids.NotRecommendedGeneratedComInterfaceUsage);
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (41)
23GeneratorDiagnostics.RequiresAllowUnsafeBlocks, 24GeneratorDiagnostics.InvalidAttributedInterfaceGenericNotSupported, 25GeneratorDiagnostics.InvalidAttributedInterfaceMissingPartialModifiers, 26GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible, 27GeneratorDiagnostics.InvalidAttributedInterfaceMissingGuidAttribute, 28GeneratorDiagnostics.InvalidStringMarshallingMismatchBetweenBaseAndDerived, 29GeneratorDiagnostics.InvalidOptionsOnInterface, 30GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, 31GeneratorDiagnostics.InvalidExceptionToUnmanagedMarshallerType, 32GeneratorDiagnostics.StringMarshallingCustomTypeNotAccessibleByGeneratedCode, 33GeneratorDiagnostics.ExceptionToUnmanagedMarshallerNotAccessibleByGeneratedCode, 34GeneratorDiagnostics.MultipleComInterfaceBaseTypes, 35GeneratorDiagnostics.BaseInterfaceIsNotGenerated, 36GeneratorDiagnostics.BaseInterfaceDefinedInOtherAssembly, 38GeneratorDiagnostics.MethodNotDeclaredInAttributedInterface, 39GeneratorDiagnostics.InstancePropertyDeclaredInInterface, 40GeneratorDiagnostics.InstanceEventDeclaredInInterface, 41GeneratorDiagnostics.CannotAnalyzeMethodPattern, 42GeneratorDiagnostics.CannotAnalyzeInterfacePattern, 44GeneratorDiagnostics.ConfigurationNotSupported, 45GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnMethod, 46GeneratorDiagnostics.ParameterTypeNotSupported, 47GeneratorDiagnostics.ReturnTypeNotSupported, 48GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, 49GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails, 50GeneratorDiagnostics.ParameterConfigurationNotSupported, 51GeneratorDiagnostics.ReturnConfigurationNotSupported, 52GeneratorDiagnostics.MarshalAsParameterConfigurationNotSupported, 53GeneratorDiagnostics.MarshalAsReturnConfigurationNotSupported, 54GeneratorDiagnostics.ConfigurationValueNotSupported, 55GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported, 56GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo, 57GeneratorDiagnostics.UnnecessaryReturnMarshallingInfo, 58GeneratorDiagnostics.ComMethodManagedReturnWillBeOutVariable, 59GeneratorDiagnostics.HResultTypeWillBeTreatedAsStruct, 60GeneratorDiagnostics.SizeOfInCollectionMustBeDefinedAtCallOutParam, 61GeneratorDiagnostics.SizeOfInCollectionMustBeDefinedAtCallReturnValue, 62GeneratorDiagnostics.InvalidExceptionMarshallingConfiguration, 63GeneratorDiagnostics.GeneratedComInterfaceUsageDoesNotFollowBestPractices); 204/// <see cref="ComInterfaceContext.GetContexts"/> will emit <see cref="GeneratorDiagnostics.BaseInterfaceIsNotGenerated"/> 251DiagnosticInfo.Create(GeneratorDiagnostics.CannotAnalyzeInterfacePattern, sym.Locations.FirstOrDefault() ?? Location.None, sym.Name));
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (2)
21= ImmutableArray.Create(GeneratorDiagnostics.InterfaceTypeNotSupported); 44context.ReportDiagnostic(comInterfaceAttribute.CreateDiagnosticInfo(GeneratorDiagnostics.InterfaceTypeNotSupported, unsupportedValue).ToDiagnostic());
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (23)
19GeneratorDiagnostics.InvalidAttributedMethodSignature, 20GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, 21GeneratorDiagnostics.ReturnConfigurationNotSupported, 22GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute, 23GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnMethod, 24GeneratorDiagnostics.InvalidExceptionMarshallingConfiguration, 25GeneratorDiagnostics.ConfigurationNotSupported, 26GeneratorDiagnostics.ParameterTypeNotSupported, 27GeneratorDiagnostics.ReturnTypeNotSupported, 28GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, 29GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails, 30GeneratorDiagnostics.ParameterConfigurationNotSupported, 31GeneratorDiagnostics.MarshalAsParameterConfigurationNotSupported, 32GeneratorDiagnostics.MarshalAsReturnConfigurationNotSupported, 33GeneratorDiagnostics.ConfigurationValueNotSupported, 34GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported, 35GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo, 36GeneratorDiagnostics.UnnecessaryReturnMarshallingInfo, 37GeneratorDiagnostics.GeneratedComInterfaceUsageDoesNotFollowBestPractices); 116return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 124return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 131return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); 137return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute, methodSyntax.Identifier.GetLocation(), method.Name);
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)
322generatorDiagnostics.ReportDiagnostic(DiagnosticInfo.Create(GeneratorDiagnostics.ComMethodManagedReturnWillBeOutVariable, symbol.Locations[0])); 359GeneratorDiagnostics.HResultTypeWillBeTreatedAsStruct, 377GeneratorDiagnostics.SizeOfInCollectionMustBeDefinedAtCallOutParam, 378GeneratorDiagnostics.SizeOfInCollectionMustBeDefinedAtCallReturnValue);
ComInterfaceInfo.cs (15)
59return DiagnosticOrInterfaceInfo.From(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, syntax.Identifier.GetLocation())); 66GeneratorDiagnostics.InvalidAttributedInterfaceGenericNotSupported, 77GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible, 129GeneratorDiagnostics.BaseInterfaceDefinedInOtherAssembly, 193GeneratorDiagnostics.InvalidAttributedInterfaceMissingPartialModifiers, 218GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, 227GeneratorDiagnostics.StringMarshallingCustomTypeNotAccessibleByGeneratedCode, 237GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, 252GeneratorDiagnostics.InvalidStringMarshallingMismatchBetweenBaseAndDerived, 274GeneratorDiagnostics.InvalidOptionsOnInterface, 288GeneratorDiagnostics.InvalidOptionsOnInterface, 309GeneratorDiagnostics.ExceptionToUnmanagedMarshallerNotAccessibleByGeneratedCode, 319GeneratorDiagnostics.InvalidExceptionToUnmanagedMarshallerType, 349GeneratorDiagnostics.MultipleComInterfaceBaseTypes, 391GeneratorDiagnostics.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)
244GeneratorDiagnostics.Ids.ConfigurationNotSupported, 255GeneratorDiagnostics.Ids.ConfigurationNotSupported, 545GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnMethod, 563GeneratorDiagnostics.InvalidExceptionMarshallingConfiguration,