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