173 references to SR
Microsoft.Interop.ComInterfaceGenerator (173)
Analyzers\AddGeneratedComClassFixer.cs (2)
82
?
SR
.AddGeneratedComClassAttributeTitle
83
:
SR
.AddGeneratedComClassAddUnsafe;
Analyzers\AnalyzerDiagnostics.cs (16)
31
return new LocalizableResourceString(resourceName,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR));
37
GetResourceString(nameof(
SR
.ConvertToGeneratedComInterfaceTitle)),
38
GetResourceString(nameof(
SR
.ConvertToGeneratedComInterfaceMessage)),
42
description: GetResourceString(nameof(
SR
.ConvertToGeneratedComInterfaceDescription)));
47
GetResourceString(nameof(
SR
.AddGeneratedComClassAttributeTitle)),
48
GetResourceString(nameof(
SR
.AddGeneratedComClassAttributeMessage)),
52
description: GetResourceString(nameof(
SR
.AddGeneratedComClassAttributeDescription)));
57
GetResourceString(nameof(
SR
.ComHostingDoesNotSupportGeneratedComInterfaceTitle)),
58
GetResourceString(nameof(
SR
.ComHostingDoesNotSupportGeneratedComInterfaceMessage)),
62
description: GetResourceString(nameof(
SR
.ComHostingDoesNotSupportGeneratedComInterfaceDescription)));
67
GetResourceString(nameof(
SR
.RuntimeComApisDoNotSupportSourceGeneratedComTitle)),
68
GetResourceString(nameof(
SR
.RuntimeComApisDoNotSupportSourceGeneratedComMessage)),
72
description: GetResourceString(nameof(
SR
.RuntimeComApisDoNotSupportSourceGeneratedComDescription)));
77
GetResourceString(nameof(
SR
.CastsBetweenRuntimeComAndSourceGeneratedComNotSupportedTitle)),
78
GetResourceString(nameof(
SR
.CastsBetweenRuntimeComAndSourceGeneratedComNotSupportedMessage)),
82
description: GetResourceString(nameof(
SR
.CastsBetweenRuntimeComAndSourceGeneratedComNotSupportedDescription)));
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
79
GeneratorDiagnosticsBag diagnostics = new(new DiagnosticDescriptorProvider(), new MethodSignatureDiagnosticLocations((MethodDeclarationSyntax)method.DeclaringSyntaxReferences[0].GetSyntax()),
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR));
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (3)
31
?
SR
.ConvertToGeneratedComInterfaceAddUnsafe
32
:
SR
.ConvertToGeneratedComInterfaceTitle;
98
WarningAnnotation.Create(
SR
.ConvertComInterfaceMayProduceInvalidCode));
ComInterfaceGenerator.cs (1)
209
var generatorDiagnostics = new GeneratorDiagnosticsBag(new DiagnosticDescriptorProvider(), diagnosticLocations,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR));
ComInterfaceInfo.cs (5)
230
SR
.InvalidStringMarshallingConfigurationMissingCustomType);
249
SR
.InvalidStringMarshallingConfigurationNotCustom);
264
SR
.GeneratedComInterfaceStringMarshallingMustMatchBase);
286
SR
.OneWrapperMustBeGenerated);
300
SR
.BaseInterfaceMustGenerateAtLeastSameWrappers);
GeneratorDiagnostics.cs (136)
39
GetResourceString(nameof(
SR
.RequiresAllowUnsafeBlocksTitleCom)),
40
GetResourceString(nameof(
SR
.RequiresAllowUnsafeBlocksMessageCom)),
44
description: GetResourceString(nameof(
SR
.RequiresAllowUnsafeBlocksDescriptionCom)));
50
GetResourceString(nameof(
SR
.InvalidVirtualMethodIndexAttributeUsage)),
51
GetResourceString(nameof(
SR
.InvalidAttributedMethodSignatureMessageCom)),
55
description: GetResourceString(nameof(
SR
.InvalidAttributedMethodDescriptionCom)));
61
GetResourceString(nameof(
SR
.InvalidVirtualMethodIndexAttributeUsage)),
62
GetResourceString(nameof(
SR
.InvalidAttributedMethodContainingTypeMissingModifiersMessageCom)),
66
description: GetResourceString(nameof(
SR
.InvalidAttributedMethodDescriptionCom)));
72
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageTitle)),
73
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceUsageMissingPartialModifier)),
77
description: GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageDescription)));
83
GetResourceString(nameof(
SR
.InvalidVirtualMethodIndexAttributeUsage)),
84
GetResourceString(nameof(
SR
.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttributeMessage)),
88
description: GetResourceString(nameof(
SR
.InvalidAttributedMethodDescriptionCom)));
94
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageTitle)),
95
GetResourceString(nameof(
SR
.InvalidStringMarshallingConfigurationOnInterfaceMessage)),
99
description: GetResourceString(nameof(
SR
.GeneratedComInterfaceStringMarshallingMustMatchBase)));
105
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageTitle)),
106
GetResourceString(nameof(
SR
.InvalidOptionsOnInterfaceMessage)),
110
description: GetResourceString(nameof(
SR
.InvalidOptionsOnInterfaceDescription)));
116
GetResourceString(nameof(
SR
.InvalidVirtualMethodIndexAttributeUsage)),
117
GetResourceString(nameof(
SR
.InvalidStringMarshallingConfigurationOnMethodMessage)),
121
description: GetResourceString(nameof(
SR
.InvalidStringMarshallingConfigurationDescription)));
127
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageTitle)),
128
GetResourceString(nameof(
SR
.InvalidStringMarshallingConfigurationOnInterfaceMessage)),
132
description: GetResourceString(nameof(
SR
.InvalidStringMarshallingConfigurationDescription)));
138
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageTitle)),
139
GetResourceString(nameof(
SR
.StringMarshallingCustomTypeNotAccessibleByGeneratedCode)),
148
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageTitle)),
149
GetResourceString(nameof(
SR
.ExceptionToUnmanagedMarshallerNotAccessibleByGeneratedCode)),
158
GetResourceString(nameof(
SR
.InvalidVirtualMethodIndexAttributeUsage)),
159
GetResourceString(nameof(
SR
.InvalidExceptionMarshallingConfigurationMessage)),
163
description: GetResourceString(nameof(
SR
.InvalidExceptionMarshallingConfigurationDescription)));
169
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageTitle)),
170
GetResourceString(nameof(
SR
.InvalidExceptionToUnmanagedMarshallerType)),
179
GetResourceString(nameof(
SR
.TypeNotSupportedTitleCom)),
180
GetResourceString(nameof(
SR
.TypeNotSupportedMessageParameterCom)),
184
description: GetResourceString(nameof(
SR
.TypeNotSupportedDescriptionCom)));
190
GetResourceString(nameof(
SR
.TypeNotSupportedTitleCom)),
191
GetResourceString(nameof(
SR
.TypeNotSupportedMessageReturnCom)),
195
description: GetResourceString(nameof(
SR
.TypeNotSupportedDescriptionCom)));
201
GetResourceString(nameof(
SR
.TypeNotSupportedTitleCom)),
202
GetResourceString(nameof(
SR
.TypeNotSupportedMessageParameterWithDetails)),
206
description: GetResourceString(nameof(
SR
.TypeNotSupportedDescriptionCom)));
212
GetResourceString(nameof(
SR
.TypeNotSupportedTitleCom)),
213
GetResourceString(nameof(
SR
.TypeNotSupportedMessageReturnWithDetails)),
217
description: GetResourceString(nameof(
SR
.TypeNotSupportedDescriptionCom)));
223
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleCom)),
224
GetResourceString(nameof(
SR
.ConfigurationNotSupportedMessageParameterCom)),
228
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionCom)));
234
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleCom)),
235
GetResourceString(nameof(
SR
.ConfigurationNotSupportedMessageReturnCom)),
239
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionCom)));
245
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleCom)),
246
GetResourceString(nameof(
SR
.MarshalAsConfigurationNotSupportedMessageParameterCom)),
250
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionCom)));
256
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleCom)),
257
GetResourceString(nameof(
SR
.MarshalAsConfigurationNotSupportedMessageReturnCom)),
261
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionCom)));
267
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleCom)),
268
GetResourceString(nameof(
SR
.ConfigurationNotSupportedMessageCom)),
272
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionCom)));
278
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleCom)),
279
GetResourceString(nameof(
SR
.ConfigurationNotSupportedMessageValueCom)),
283
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionCom)));
289
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleCom)),
290
GetResourceString(nameof(
SR
.ConfigurationNotSupportedMessageMarshallingInfoCom)),
294
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionCom)));
300
GetResourceString(nameof(
SR
.MethodNotDeclaredInAttributedInterfaceTitle)),
301
GetResourceString(nameof(
SR
.MethodNotDeclaredInAttributedInterfaceMessage)),
305
description: GetResourceString(nameof(
SR
.MethodNotDeclaredInAttributedInterfaceDescription)));
311
GetResourceString(nameof(
SR
.InvalidPropertyDeclarationOnGeneratedComInterfaceTitle)),
312
GetResourceString(nameof(
SR
.InvalidPropertyDeclarationOnGeneratedComInterfaceMessage)),
316
description: GetResourceString(nameof(
SR
.InvalidPropertyDeclarationOnGeneratedComInterfaceDescription)));
322
GetResourceString(nameof(
SR
.PropertyAccessorsMustBeAllOrNothingTitle)),
323
GetResourceString(nameof(
SR
.PropertyAccessorsMustBeAllOrNothingMessage)),
327
description: GetResourceString(nameof(
SR
.PropertyAccessorsMustBeAllOrNothingDescription)));
333
GetResourceString(nameof(
SR
.MarshalAttributeOnDefaultImplementedComInterfaceMemberTitle)),
334
GetResourceString(nameof(
SR
.MarshalAttributeOnDefaultImplementedComInterfaceMemberMessage)),
338
description: GetResourceString(nameof(
SR
.MarshalAttributeOnDefaultImplementedComInterfaceMemberDescription)));
344
GetResourceString(nameof(
SR
.MarshalUsingOnPropertyAccessorMustSpecifyTypeTitle)),
345
GetResourceString(nameof(
SR
.MarshalUsingOnPropertyAccessorMustSpecifyTypeMessage)),
349
description: GetResourceString(nameof(
SR
.MarshalUsingOnPropertyAccessorMustSpecifyTypeDescription)));
355
GetResourceString(nameof(
SR
.InstanceEventDeclaredInInterfaceTitle)),
356
GetResourceString(nameof(
SR
.InstanceEventDeclaredInInterfaceMessage)),
360
description: GetResourceString(nameof(
SR
.InstanceEventDeclaredInInterfaceDescription)));
366
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageTitle)),
367
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageInterfaceNotAccessible)),
371
description: GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageDescription)));
377
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageTitle)),
378
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageMissingGuidAttribute)),
382
description: GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageDescription)));
388
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageTitle)),
389
GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageInterfaceIsGeneric)),
393
description: GetResourceString(nameof(
SR
.InvalidGeneratedComInterfaceAttributeUsageDescription)));
399
GetResourceString(nameof(
SR
.MultipleComInterfaceBaseTypesTitle)),
400
GetResourceString(nameof(
SR
.MultipleComInterfaceBaseTypesMessage)),
404
description: GetResourceString(nameof(
SR
.MultipleComInterfaceBaseTypesDescription)));
410
GetResourceString(nameof(
SR
.AnalysisFailedTitle)),
411
GetResourceString(nameof(
SR
.AnalysisFailedMethodMessage)),
415
description: GetResourceString(nameof(
SR
.AnalysisFailedDescription)));
421
GetResourceString(nameof(
SR
.AnalysisFailedTitle)),
422
GetResourceString(nameof(
SR
.AnalysisFailedInterfaceMessage)),
426
description: GetResourceString(nameof(
SR
.AnalysisFailedDescription)));
432
GetResourceString(nameof(
SR
.BaseInterfaceCannotBeGeneratedTitle)),
433
GetResourceString(nameof(
SR
.BaseInterfaceCannotBeGeneratedMessage)),
437
description: GetResourceString(nameof(
SR
.BaseInterfaceCannotBeGeneratedDescription)));
443
GetResourceString(nameof(
SR
.InvalidGeneratedComClassAttributeUsageTitle)),
444
GetResourceString(nameof(
SR
.InvalidGeneratedComClassAttributeUsageMissingPartialModifier)),
448
description: GetResourceString(nameof(
SR
.InvalidGeneratedComClassAttributeUsageDescription)));
454
GetResourceString(nameof(
SR
.InterfaceTypeNotSupportedTitle)),
455
GetResourceString(nameof(
SR
.InterfaceTypeNotSupportedMessage)),
459
description: GetResourceString(nameof(
SR
.InterfaceTypeNotSupportedMessage)));
465
GetResourceString(nameof(
SR
.InvalidGeneratedComClassAttributeUsageTitle)),
466
GetResourceString(nameof(
SR
.ClassDoesNotImplementAnyGeneratedComInterfacesMessage)),
470
description: GetResourceString(nameof(
SR
.ClassDoesNotImplementAnyGeneratedComInterfacesDescription)));
476
GetResourceString(nameof(
SR
.UnnecessaryMarshallingInfoTitle)),
477
GetResourceString(nameof(
SR
.UnnecessaryParameterMarshallingInfoMessage)),
481
description: GetResourceString(nameof(
SR
.UnnecessaryMarshallingInfoDescription)),
491
GetResourceString(nameof(
SR
.UnnecessaryMarshallingInfoTitle)),
492
GetResourceString(nameof(
SR
.UnnecessaryReturnMarshallingInfoMessage)),
496
description: GetResourceString(nameof(
SR
.UnnecessaryMarshallingInfoDescription)),
506
GetResourceString(nameof(
SR
.SizeOfCollectionMustBeKnownAtMarshalTimeTitle)),
507
GetResourceString(nameof(
SR
.SizeOfCollectionMustBeKnownAtMarshalTimeMessageOutParam)),
516
GetResourceString(nameof(
SR
.SizeOfCollectionMustBeKnownAtMarshalTimeTitle)),
517
GetResourceString(nameof(
SR
.SizeOfCollectionMustBeKnownAtMarshalTimeMessageReturnValue)),
526
GetResourceString(nameof(
SR
.ComMethodReturningIntWillBeOutParameterTitle)),
527
GetResourceString(nameof(
SR
.ComMethodReturningIntWillBeOutParameterMessage)),
536
GetResourceString(nameof(
SR
.HResultTypeWillBeTreatedAsStructTitle)),
537
GetResourceString(nameof(
SR
.HResultTypeWillBeTreatedAsStructMessage)),
546
GetResourceString(nameof(
SR
.ComInterfaceUsageDoesNotFollowBestPracticesTitle)),
547
GetResourceString(nameof(
SR
.ComInterfaceUsageDoesNotFollowBestPracticesMessageWithDetails)),
557
GetResourceString(nameof(
SR
.BaseInterfaceDefinedInOtherAssemblyTitle)),
558
GetResourceString(nameof(
SR
.BaseInterfaceDefinedInOtherAssemblyMessage)),
602
return new LocalizableResourceString(resourceName,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR));
VirtualMethodPointerStubGenerator.cs (3)
27
var diagnostics = new GeneratorDiagnosticsBag(new DiagnosticDescriptorProvider(), methodStub.DiagnosticLocation,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR));
201
var diagnostics = new GeneratorDiagnosticsBag(new DiagnosticDescriptorProvider(), methodStub.DiagnosticLocation,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR));
344
var diagnostics = new GeneratorDiagnosticsBag(new DiagnosticDescriptorProvider(), method.DiagnosticLocation,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR));
VtableIndexStubGenerator.cs (6)
304
var generatorDiagnostics = new GeneratorDiagnosticsBag(new DiagnosticDescriptorProvider(), locations,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR));
324
virtualMethodIndexAttr, symbol.Name,
SR
.InvalidStringMarshallingConfigurationMissingCustomType);
331
virtualMethodIndexAttr, symbol.Name,
SR
.InvalidStringMarshallingConfigurationNotCustom);
403
virtualMethodIndexAttr, symbol.Name,
SR
.InvalidExceptionMarshallingConfigurationMissingCustomType);
411
virtualMethodIndexAttr, symbol.Name,
SR
.InvalidExceptionMarshallingConfigurationNotCustom);
432
virtualMethodIndexAttr, symbol.Name,
SR
.InvalidExceptionMarshallingValue);