127 references to GeneratorDiagnostics
Microsoft.Interop.ComInterfaceGenerator (127)
Analyzers\AddMarshalAsToElementFixer.cs (1)
20public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(GeneratorDiagnostics.Ids.NotRecommendedGeneratedComInterfaceUsage);
Analyzers\ComClassGeneratorDiagnosticsAnalyzer.cs (6)
20GeneratorDiagnostics.RequiresAllowUnsafeBlocks, 21GeneratorDiagnostics.InvalidAttributedClassMissingPartialModifier, 22GeneratorDiagnostics.ClassDoesNotImplementAnyGeneratedComInterface); 70yield return Diagnostic.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, location); 79GeneratorDiagnostics.InvalidAttributedClassMissingPartialModifier, 102GeneratorDiagnostics.ClassDoesNotImplementAnyGeneratedComInterface,
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (45)
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.InstanceEventDeclaredInInterface, 40GeneratorDiagnostics.InvalidAttributedMethodSignature, 41GeneratorDiagnostics.InvalidPropertyDeclarationOnGeneratedComInterface, 42GeneratorDiagnostics.PropertyAccessorsMustBeAllOrNothing, 43GeneratorDiagnostics.CannotAnalyzeMethodPattern, 44GeneratorDiagnostics.CannotAnalyzeInterfacePattern, 46GeneratorDiagnostics.ConfigurationNotSupported, 47GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnMethod, 48GeneratorDiagnostics.ParameterTypeNotSupported, 49GeneratorDiagnostics.ReturnTypeNotSupported, 50GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, 51GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails, 52GeneratorDiagnostics.ParameterConfigurationNotSupported, 53GeneratorDiagnostics.ReturnConfigurationNotSupported, 54GeneratorDiagnostics.MarshalAsParameterConfigurationNotSupported, 55GeneratorDiagnostics.MarshalAsReturnConfigurationNotSupported, 56GeneratorDiagnostics.ConfigurationValueNotSupported, 57GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported, 58GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo, 59GeneratorDiagnostics.UnnecessaryReturnMarshallingInfo, 60GeneratorDiagnostics.ComMethodManagedReturnWillBeOutVariable, 61GeneratorDiagnostics.HResultTypeWillBeTreatedAsStruct, 62GeneratorDiagnostics.SizeOfInCollectionMustBeDefinedAtCallOutParam, 63GeneratorDiagnostics.SizeOfInCollectionMustBeDefinedAtCallReturnValue, 64GeneratorDiagnostics.InvalidExceptionMarshallingConfiguration, 65GeneratorDiagnostics.MarshalUsingOnPropertyAccessorMustSpecifyType, 66GeneratorDiagnostics.MarshalAttributeOnDefaultImplementedComInterfaceMember, 67GeneratorDiagnostics.GeneratedComInterfaceUsageDoesNotFollowBestPractices); 208/// <see cref="ComInterfaceContext.GetContexts"/> will emit <see cref="GeneratorDiagnostics.BaseInterfaceIsNotGenerated"/> 255DiagnosticInfo.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);
ComInterfaceContext.cs (1)
72GeneratorDiagnostics.BaseInterfaceIsNotGenerated,
ComInterfaceGenerator.cs (4)
254generatorDiagnostics.ReportDiagnostic(DiagnosticInfo.Create(GeneratorDiagnostics.ComMethodManagedReturnWillBeOutVariable, symbol.Locations[0])); 291GeneratorDiagnostics.HResultTypeWillBeTreatedAsStruct, 309GeneratorDiagnostics.SizeOfInCollectionMustBeDefinedAtCallOutParam, 310GeneratorDiagnostics.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 (14)
77methods.Add(DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(member.CreateDiagnosticInfo(GeneratorDiagnostics.InstanceEventDeclaredInInterface, member.Name, data.ifaceSymbol.ToDisplayString()))); 124diagnostic = DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, comMethodDeclaringSyntax.Identifier.GetLocation(), method.Name); 131diagnostic = DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, comMethodDeclaringSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); 187methods.Add(DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(DiagnosticInfo.Create(GeneratorDiagnostics.MethodNotDeclaredInAttributedInterface, method.Locations.FirstOrDefault(), method.ToDisplayString()))); 204methods.Add(DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(DiagnosticInfo.Create(GeneratorDiagnostics.CannotAnalyzeMethodPattern, method.Locations.FirstOrDefault(), method.ToDisplayString()))); 240/// property is reported as <see cref="GeneratorDiagnostics.PropertyAccessorsMustBeAllOrNothing"/>. 276DiagnosticInfo.Create(GeneratorDiagnostics.MethodNotDeclaredInAttributedInterface, property.Locations.FirstOrDefault(), property.ToDisplayString()))); 296DiagnosticInfo.Create(GeneratorDiagnostics.CannotAnalyzeMethodPattern, property.Locations.FirstOrDefault(), property.ToDisplayString()))); 429GeneratorDiagnostics.InvalidPropertyDeclarationOnGeneratedComInterface, 451GeneratorDiagnostics.InvalidPropertyDeclarationOnGeneratedComInterface, 493GeneratorDiagnostics.PropertyAccessorsMustBeAllOrNothing, 511GeneratorDiagnostics.ReturnConfigurationNotSupported, 525GeneratorDiagnostics.MarshalUsingOnPropertyAccessorMustSpecifyType, 633GeneratorDiagnostics.MarshalAttributeOnDefaultImplementedComInterfaceMember,
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, 578GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnMethod, 596GeneratorDiagnostics.InvalidExceptionMarshallingConfiguration,