272 references to SR
Microsoft.Interop.LibraryImportGenerator (272)
Analyzers\AnalyzerDiagnostics.cs (1)
33
return new LocalizableResourceString(resourceName,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.LibraryImportGenerator.SR));
Analyzers\ConvertToLibraryImportAnalyzer.cs (4)
26
GetResourceString(nameof(
SR
.ConvertToLibraryImportTitle)),
27
GetResourceString(nameof(
SR
.ConvertToLibraryImportMessage)),
31
description: GetResourceString(nameof(
SR
.ConvertToLibraryImportDescription)));
141
GeneratorDiagnosticsBag diagnostics = new(new DiagnosticDescriptorProvider(), new MethodSignatureDiagnosticLocations((MethodDeclarationSyntax)method.DeclaringSyntaxReferences[0].GetSyntax()),
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.LibraryImportGenerator.SR));
Analyzers\ConvertToLibraryImportFixer.cs (8)
49
(true, true) =>
SR
.Format(
SR
.ConvertToLibraryImportWithSuffixAddUnsafe, suffix),
50
(true, false) =>
SR
.ConvertToLibraryImportAddUnsafe,
51
(false, true) =>
SR
.Format(
SR
.ConvertToLibraryImportWithSuffix, suffix),
52
(false, false) =>
SR
.ConvertToLibraryImport
186
generatedDeclaration = generatedDeclaration.WithAdditionalAnnotations(WarningAnnotation.Create(
SR
.ConvertNoPreserveSigDllImportToGeneratedMayProduceInvalidCode));
232
WarningAnnotation.Create(
SR
.ConvertToLibraryImportMayRequireCustomMarshalling));
Analyzers\CustomMarshallerAttributeAnalyzer.cs (162)
42
/// <inheritdoc cref="
SR
.MarshallerTypeMustSpecifyManagedTypeMessage" />
46
GetResourceString(nameof(
SR
.InvalidCustomMarshallerAttributeUsageTitle)),
47
GetResourceString(nameof(
SR
.MarshallerTypeMustSpecifyManagedTypeMessage)),
51
description: GetResourceString(nameof(
SR
.MarshallerTypeMustSpecifyManagedTypeDescription)));
53
/// <inheritdoc cref="
SR
.MarshallerTypeMustBeStaticClassOrStructMessage" />
57
GetResourceString(nameof(
SR
.InvalidMarshallerTypeTitle)),
58
GetResourceString(nameof(
SR
.MarshallerTypeMustBeStaticClassOrStructMessage)),
62
description: GetResourceString(nameof(
SR
.MarshallerTypeMustBeStaticClassOrStructDescription)));
64
/// <inheritdoc cref="
SR
.ElementMarshallerCannotBeStatefulMessage" />
68
GetResourceString(nameof(
SR
.InvalidMarshallerTypeTitle)),
69
GetResourceString(nameof(
SR
.ElementMarshallerCannotBeStatefulMessage)),
73
description: GetResourceString(nameof(
SR
.ElementMarshallerCannotBeStatefulDescription)));
75
/// <inheritdoc cref="
SR
.TypeMustBeUnmanagedMessage" />
79
GetResourceString(nameof(
SR
.InvalidMarshallerTypeTitle)),
80
GetResourceString(nameof(
SR
.TypeMustBeUnmanagedMessage)),
84
description: GetResourceString(nameof(
SR
.TypeMustBeUnmanagedDescription)));
86
/// <inheritdoc cref="
SR
.GetPinnableReferenceReturnTypeBlittableMessage" />
90
GetResourceString(nameof(
SR
.InvalidSignaturesInMarshallerShapeTitle)),
91
GetResourceString(nameof(
SR
.GetPinnableReferenceReturnTypeBlittableMessage)),
95
description: GetResourceString(nameof(
SR
.GetPinnableReferenceReturnTypeBlittableDescription)));
97
/// <inheritdoc cref="
SR
.TypeMustHaveExplicitCastFromVoidPointerMessage" />
101
GetResourceString(nameof(
SR
.InvalidMarshallerTypeTitle)),
102
GetResourceString(nameof(
SR
.TypeMustHaveExplicitCastFromVoidPointerMessage)),
106
description: GetResourceString(nameof(
SR
.TypeMustHaveExplicitCastFromVoidPointerDescription)));
108
/// <inheritdoc cref="
SR
.StatelessValueInRequiresConvertToUnmanagedMessage" />
112
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
113
GetResourceString(nameof(
SR
.StatelessValueInRequiresConvertToUnmanagedMessage)),
117
description: GetResourceString(nameof(
SR
.StatelessValueInRequiresConvertToUnmanagedDescription)));
119
/// <inheritdoc cref="
SR
.StatelessLinearCollectionRequiresTwoParameterAllocateContainerForUnmanagedElementsMessage" />
123
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
124
GetResourceString(nameof(
SR
.StatelessLinearCollectionRequiresTwoParameterAllocateContainerForUnmanagedElementsMessage)),
128
description: GetResourceString(nameof(
SR
.StatelessLinearCollectionRequiresTwoParameterAllocateContainerForUnmanagedElementsDescription)));
130
/// <inheritdoc cref="
SR
.OutRequiresToManagedMessage" />
134
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
135
GetResourceString(nameof(
SR
.OutRequiresToManagedMessage)),
139
description: GetResourceString(nameof(
SR
.OutRequiresToManagedDescription)));
141
/// <inheritdoc cref="
SR
.StatelessRequiresConvertToManagedMessage" />
145
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
146
GetResourceString(nameof(
SR
.StatelessRequiresConvertToManagedMessage)),
150
description: GetResourceString(nameof(
SR
.StatelessRequiresConvertToManagedDescription)));
152
/// <inheritdoc cref="
SR
.LinearCollectionInRequiresCollectionMethodsMessage" />
156
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
157
GetResourceString(nameof(
SR
.LinearCollectionInRequiresCollectionMethodsMessage)),
161
description: GetResourceString(nameof(
SR
.LinearCollectionInRequiresCollectionMethodsDescription)));
163
/// <inheritdoc cref="
SR
.StatelessLinearCollectionInRequiresCollectionMethodsMessage" />
167
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
168
GetResourceString(nameof(
SR
.StatelessLinearCollectionInRequiresCollectionMethodsMessage)),
172
description: GetResourceString(nameof(
SR
.StatelessLinearCollectionInRequiresCollectionMethodsDescription)));
174
/// <inheritdoc cref="
SR
.LinearCollectionOutRequiresCollectionMethodsMessage" />
178
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
179
GetResourceString(nameof(
SR
.LinearCollectionOutRequiresCollectionMethodsMessage)),
183
description: GetResourceString(nameof(
SR
.LinearCollectionOutRequiresCollectionMethodsDescription)));
185
/// <inheritdoc cref="
SR
.StatelessLinearCollectionOutRequiresCollectionMethodsMessage" />
189
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
190
GetResourceString(nameof(
SR
.StatelessLinearCollectionOutRequiresCollectionMethodsMessage)),
194
description: GetResourceString(nameof(
SR
.StatelessLinearCollectionOutRequiresCollectionMethodsDescription)));
196
/// <inheritdoc cref="
SR
.StatelessLinearCollectionRequiresTwoParameterAllocateContainerForManagedElementsMessage" />
200
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
201
GetResourceString(nameof(
SR
.StatelessLinearCollectionRequiresTwoParameterAllocateContainerForManagedElementsMessage)),
205
description: GetResourceString(nameof(
SR
.StatelessLinearCollectionRequiresTwoParameterAllocateContainerForManagedElementsDescription)));
207
/// <inheritdoc cref="
SR
.CallerAllocFromManagedMustHaveBufferSizeMessage" />
211
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
212
GetResourceString(nameof(
SR
.CallerAllocFromManagedMustHaveBufferSizeMessage)),
216
description: GetResourceString(nameof(
SR
.CallerAllocFromManagedMustHaveBufferSizeDescription)));
218
/// <inheritdoc cref="
SR
.StatelessLinearCollectionCallerAllocFromManagedMustHaveBufferSizeMessage" />
222
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
223
GetResourceString(nameof(
SR
.StatelessLinearCollectionCallerAllocFromManagedMustHaveBufferSizeMessage)),
227
description: GetResourceString(nameof(
SR
.StatelessLinearCollectionCallerAllocFromManagedMustHaveBufferSizeDescription)));
229
/// <inheritdoc cref="
SR
.StatefulMarshallerRequiresFromManagedMessage" />
233
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
234
GetResourceString(nameof(
SR
.StatefulMarshallerRequiresFromManagedMessage)),
238
description: GetResourceString(nameof(
SR
.StatefulMarshallerRequiresFromManagedDescription)));
240
/// <inheritdoc cref="
SR
.StatefulMarshallerRequiresToUnmanagedMessage" />
244
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
245
GetResourceString(nameof(
SR
.StatefulMarshallerRequiresToUnmanagedMessage)),
249
description: GetResourceString(nameof(
SR
.StatefulMarshallerRequiresToUnmanagedDescription)));
251
/// <inheritdoc cref="
SR
.StatefulMarshallerRequiresToManagedMessage" />
255
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
256
GetResourceString(nameof(
SR
.StatefulMarshallerRequiresToManagedMessage)),
260
description: GetResourceString(nameof(
SR
.StatefulMarshallerRequiresToManagedDescription)));
262
/// <inheritdoc cref="
SR
.StatefulMarshallerRequiresFromUnmanagedMessage" />
266
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
267
GetResourceString(nameof(
SR
.StatefulMarshallerRequiresFromUnmanagedMessage)),
271
description: GetResourceString(nameof(
SR
.StatefulMarshallerRequiresFromUnmanagedDescription)));
273
/// <inheritdoc cref="
SR
.StatefulMarshallerRequiresFreeMessage" />
277
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
278
GetResourceString(nameof(
SR
.StatefulMarshallerRequiresFreeMessage)),
282
description: GetResourceString(nameof(
SR
.StatefulMarshallerRequiresFreeDescription)));
284
/// <inheritdoc cref="
SR
.FromUnmanagedOverloadsNotSupportedMessage" />
288
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
289
GetResourceString(nameof(
SR
.FromUnmanagedOverloadsNotSupportedMessage)),
293
description: GetResourceString(nameof(
SR
.FromUnmanagedOverloadsNotSupportedDescription)));
295
/// <inheritdoc cref="
SR
.MarshallerTypeMustBeClosedOrMatchArityMessage" />
299
GetResourceString(nameof(
SR
.InvalidMarshallerTypeTitle)),
300
GetResourceString(nameof(
SR
.MarshallerTypeMustBeClosedOrMatchArityMessage)),
304
description: GetResourceString(nameof(
SR
.MarshallerTypeMustBeClosedOrMatchArityDescription)));
306
/// <inheritdoc cref="
SR
.MarshallerTypeMustBeNonNullMessage" />
310
GetResourceString(nameof(
SR
.InvalidMarshallerTypeTitle)),
311
GetResourceString(nameof(
SR
.MarshallerTypeMustBeNonNullMessage)),
315
description: GetResourceString(nameof(
SR
.MarshallerTypeMustBeNonNullDescription)));
317
/// <inheritdoc cref="
SR
.FirstParameterMustMatchReturnTypeMessage" />
321
GetResourceString(nameof(
SR
.InvalidSignaturesInMarshallerShapeTitle)),
322
GetResourceString(nameof(
SR
.FirstParameterMustMatchReturnTypeMessage)),
326
description: GetResourceString(nameof(
SR
.FirstParameterMustMatchReturnTypeDescription)));
328
/// <inheritdoc cref="
SR
.ReturnTypesMustMatchMessage" />
332
GetResourceString(nameof(
SR
.InvalidSignaturesInMarshallerShapeTitle)),
333
GetResourceString(nameof(
SR
.ReturnTypesMustMatchMessage)),
337
description: GetResourceString(nameof(
SR
.ReturnTypesMustMatchDescription)));
339
/// <inheritdoc cref="
SR
.FirstParametersMustMatchMessage" />
343
GetResourceString(nameof(
SR
.InvalidSignaturesInMarshallerShapeTitle)),
344
GetResourceString(nameof(
SR
.FirstParametersMustMatchMessage)),
348
description: GetResourceString(nameof(
SR
.FirstParametersMustMatchDescription)));
350
/// <inheritdoc cref="
SR
.ElementTypesOfReturnTypesMustMatchMessage" />
354
GetResourceString(nameof(
SR
.InvalidSignaturesInMarshallerShapeTitle)),
355
GetResourceString(nameof(
SR
.ElementTypesOfReturnTypesMustMatchMessage)),
359
description: GetResourceString(nameof(
SR
.ElementTypesOfReturnTypesMustMatchDescription)));
361
/// <inheritdoc cref="
SR
.ReturnTypeMustBeExpectedTypeMessage" />
365
GetResourceString(nameof(
SR
.InvalidSignaturesInMarshallerShapeTitle)),
366
GetResourceString(nameof(
SR
.ReturnTypeMustBeExpectedTypeMessage)),
370
description: GetResourceString(nameof(
SR
.ReturnTypeMustBeExpectedTypeDescription)));
372
/// <inheritdoc cref="
SR
.ManagedTypeMustBeClosedOrMatchArityMessage" />
376
GetResourceString(nameof(
SR
.InvalidManagedTypeTitle)),
377
GetResourceString(nameof(
SR
.ManagedTypeMustBeClosedOrMatchArityMessage)),
381
description: GetResourceString(nameof(
SR
.ManagedTypeMustBeClosedOrMatchArityDescription)));
383
/// <inheritdoc cref="
SR
.ManagedTypeMustBeNonNullMessage" />
387
GetResourceString(nameof(
SR
.InvalidManagedTypeTitle)),
388
GetResourceString(nameof(
SR
.ManagedTypeMustBeNonNullMessage)),
392
description: GetResourceString(nameof(
SR
.ManagedTypeMustBeNonNullDescription)));
394
/// <inheritdoc cref="
SR
.MarshalModeMustBeValidEnumValue" />
398
GetResourceString(nameof(
SR
.InvalidMarshalModeTitle)),
399
GetResourceString(nameof(
SR
.MarshalModeMustBeValidEnumValue)),
403
description: GetResourceString(nameof(
SR
.MarshalModeMustBeValidEnumValue)));
416
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
417
GetResourceString(nameof(
SR
.StatelessValueInRequiresConvertToUnmanagedMessage)),
421
description: GetResourceString(nameof(
SR
.StatelessValueInRequiresConvertToUnmanagedDescription)));
427
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
428
GetResourceString(nameof(
SR
.StatelessLinearCollectionRequiresTwoParameterAllocateContainerForUnmanagedElementsMessage)),
432
description: GetResourceString(nameof(
SR
.StatelessLinearCollectionRequiresTwoParameterAllocateContainerForUnmanagedElementsDescription)));
438
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
439
GetResourceString(nameof(
SR
.StatelessRequiresConvertToManagedMessage)),
443
description: GetResourceString(nameof(
SR
.StatelessRequiresConvertToManagedDescription)));
449
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
450
GetResourceString(nameof(
SR
.StatelessLinearCollectionInRequiresCollectionMethodsMessage)),
454
description: GetResourceString(nameof(
SR
.StatelessLinearCollectionInRequiresCollectionMethodsDescription)));
460
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
461
GetResourceString(nameof(
SR
.StatelessLinearCollectionOutRequiresCollectionMethodsMessage)),
465
description: GetResourceString(nameof(
SR
.StatelessLinearCollectionOutRequiresCollectionMethodsDescription)));
471
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
472
GetResourceString(nameof(
SR
.StatelessLinearCollectionRequiresTwoParameterAllocateContainerForManagedElementsMessage)),
476
description: GetResourceString(nameof(
SR
.StatelessLinearCollectionRequiresTwoParameterAllocateContainerForManagedElementsDescription)));
482
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
483
GetResourceString(nameof(
SR
.StatefulMarshallerRequiresFromManagedMessage)),
487
description: GetResourceString(nameof(
SR
.StatefulMarshallerRequiresFromManagedDescription)));
493
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
494
GetResourceString(nameof(
SR
.StatefulMarshallerRequiresToUnmanagedMessage)),
498
description: GetResourceString(nameof(
SR
.StatefulMarshallerRequiresToUnmanagedDescription)));
504
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
505
GetResourceString(nameof(
SR
.StatefulMarshallerRequiresToManagedMessage)),
509
description: GetResourceString(nameof(
SR
.StatefulMarshallerRequiresToManagedDescription)));
515
GetResourceString(nameof(
SR
.CustomMarshallerTypeMustHaveRequiredShapeTitle)),
516
GetResourceString(nameof(
SR
.StatefulMarshallerRequiresFromUnmanagedMessage)),
520
description: GetResourceString(nameof(
SR
.StatefulMarshallerRequiresFromUnmanagedDescription)));
Analyzers\CustomMarshallerAttributeFixer.cs (2)
84
return CodeAction.Create(
SR
.AddMissingCustomTypeMarshallerMembers, ct => Task.FromResult(symbolEditor.ChangedSolution));
123
SR
.AddMissingCustomTypeMarshallerMembers,
Analyzers\NativeMarshallingAttributeAnalyzer.cs (9)
27
GetResourceString(nameof(
SR
.InvalidNativeMarshallingAttributeUsageTitle)),
28
GetResourceString(nameof(
SR
.EntryPointTypeMustHaveCustomMarshallerAttributeWithMatchingManagedTypeMessage)),
32
description: GetResourceString(nameof(
SR
.EntryPointTypeMustHaveCustomMarshallerAttributeWithMatchingManagedTypeDescription)));
37
GetResourceString(nameof(
SR
.InvalidNativeMarshallingAttributeUsageTitle)),
38
GetResourceString(nameof(
SR
.EntryPointTypeMustBeNonNullMessage)),
42
description: GetResourceString(nameof(
SR
.EntryPointTypeMustBeNonNullDescription)));
47
GetResourceString(nameof(
SR
.InvalidNativeMarshallingAttributeUsageTitle)),
48
GetResourceString(nameof(
SR
.GenericEntryPointMarshallerTypeMustBeClosedOrMatchArityMessage)),
52
description: GetResourceString(nameof(
SR
.GenericEntryPointMarshallerTypeMustBeClosedOrMatchArityDescription)));
GeneratorDiagnostics.cs (82)
31
/// <inheritdoc cref="
SR
.InvalidAttributedMethodSignatureMessageLibraryImport"/>
35
GetResourceString(nameof(
SR
.InvalidLibraryImportAttributeUsageTitle)),
36
GetResourceString(nameof(
SR
.InvalidAttributedMethodSignatureMessageLibraryImport)),
40
description: GetResourceString(nameof(
SR
.InvalidAttributedMethodDescriptionLibraryImport)));
42
/// <inheritdoc cref="
SR
.InvalidAttributedMethodContainingTypeMissingModifiersMessageLibraryImport"/>
46
GetResourceString(nameof(
SR
.InvalidLibraryImportAttributeUsageTitle)),
47
GetResourceString(nameof(
SR
.InvalidAttributedMethodContainingTypeMissingModifiersMessageLibraryImport)),
51
description: GetResourceString(nameof(
SR
.InvalidAttributedMethodDescriptionLibraryImport)));
53
/// <inheritdoc cref="
SR
.InvalidStringMarshallingConfigurationMessageLibraryImport"/>
57
GetResourceString(nameof(
SR
.InvalidLibraryImportAttributeUsageTitle)),
58
GetResourceString(nameof(
SR
.InvalidStringMarshallingConfigurationMessageLibraryImport)),
62
description: GetResourceString(nameof(
SR
.InvalidStringMarshallingConfigurationDescription)));
64
/// <inheritdoc cref="
SR
.TypeNotSupportedMessageParameterLibraryImport"/>
68
GetResourceString(nameof(
SR
.TypeNotSupportedTitle)),
69
GetResourceString(nameof(
SR
.TypeNotSupportedMessageParameterLibraryImport)),
73
description: GetResourceString(nameof(
SR
.TypeNotSupportedDescriptionLibraryImport)));
75
/// <inheritdoc cref="
SR
.TypeNotSupportedMessageReturnLibraryImport"/>
79
GetResourceString(nameof(
SR
.TypeNotSupportedTitle)),
80
GetResourceString(nameof(
SR
.TypeNotSupportedMessageReturnLibraryImport)),
84
description: GetResourceString(nameof(
SR
.TypeNotSupportedDescriptionLibraryImport)));
86
/// <inheritdoc cref="
SR
.TypeNotSupportedMessageParameterWithDetails"/>
90
GetResourceString(nameof(
SR
.TypeNotSupportedTitle)),
91
GetResourceString(nameof(
SR
.TypeNotSupportedMessageParameterWithDetails)),
95
description: GetResourceString(nameof(
SR
.TypeNotSupportedDescriptionLibraryImport)));
97
/// <inheritdoc cref="
SR
.TypeNotSupportedMessageReturnWithDetails"/>
101
GetResourceString(nameof(
SR
.TypeNotSupportedTitle)),
102
GetResourceString(nameof(
SR
.TypeNotSupportedMessageReturnWithDetails)),
106
description: GetResourceString(nameof(
SR
.TypeNotSupportedDescriptionLibraryImport)));
108
/// <inheritdoc cref="
SR
.ConfigurationNotSupportedMessageParameterLibraryImport"/>
112
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleLibraryImport)),
113
GetResourceString(nameof(
SR
.ConfigurationNotSupportedMessageParameterLibraryImport)),
117
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionLibraryImport)));
119
/// <inheritdoc cref="
SR
.ConfigurationNotSupportedMessageReturnLibraryImport"/>
123
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleLibraryImport)),
124
GetResourceString(nameof(
SR
.ConfigurationNotSupportedMessageReturnLibraryImport)),
128
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionLibraryImport)));
130
/// <inheritdoc cref="
SR
.MarshalAsConfigurationNotSupportedMessageParameterLibraryImport"/>
134
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleLibraryImport)),
135
GetResourceString(nameof(
SR
.MarshalAsConfigurationNotSupportedMessageParameterLibraryImport)),
139
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionLibraryImport)));
141
/// <inheritdoc cref="
SR
.MarshalAsConfigurationNotSupportedMessageReturnLibraryImport"/>
145
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleLibraryImport)),
146
GetResourceString(nameof(
SR
.MarshalAsConfigurationNotSupportedMessageReturnLibraryImport)),
150
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionLibraryImport)));
152
/// <inheritdoc cref="
SR
.ConfigurationNotSupportedMessageLibraryImport"/>
156
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleLibraryImport)),
157
GetResourceString(nameof(
SR
.ConfigurationNotSupportedMessageLibraryImport)),
161
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionLibraryImport)));
163
/// <inheritdoc cref="
SR
.ConfigurationNotSupportedMessageValueLibraryImport"/>
167
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleLibraryImport)),
168
GetResourceString(nameof(
SR
.ConfigurationNotSupportedMessageValueLibraryImport)),
172
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionLibraryImport)));
174
/// <inheritdoc cref="
SR
.ConfigurationNotSupportedMessageMarshallingInfoLibraryImport"/>
178
GetResourceString(nameof(
SR
.ConfigurationNotSupportedTitleLibraryImport)),
179
GetResourceString(nameof(
SR
.ConfigurationNotSupportedMessageMarshallingInfoLibraryImport)),
183
description: GetResourceString(nameof(
SR
.ConfigurationNotSupportedDescriptionLibraryImport)));
185
/// <inheritdoc cref="
SR
.CannotForwardToDllImportMessage"/>
189
GetResourceString(nameof(
SR
.CannotForwardToDllImportTitle)),
190
GetResourceString(nameof(
SR
.CannotForwardToDllImportMessage)),
194
description: GetResourceString(nameof(
SR
.CannotForwardToDllImportDescription)));
196
/// <inheritdoc cref="
SR
.RequiresAllowUnsafeBlocksMessageLibraryImport"/>
200
GetResourceString(nameof(
SR
.RequiresAllowUnsafeBlocksTitleLibraryImport)),
201
GetResourceString(nameof(
SR
.RequiresAllowUnsafeBlocksMessageLibraryImport)),
205
description: GetResourceString(nameof(
SR
.RequiresAllowUnsafeBlocksDescriptionLibraryImport)));
207
/// <inheritdoc cref="
SR
.UnnecessaryParameterMarshallingInfoMessage"/>
211
GetResourceString(nameof(
SR
.UnnecessaryMarshallingInfoTitle)),
212
GetResourceString(nameof(
SR
.UnnecessaryParameterMarshallingInfoMessage)),
216
description: GetResourceString(nameof(
SR
.UnnecessaryMarshallingInfoDescription)),
222
/// <inheritdoc cref="
SR
.UnnecessaryMarshallingInfoDescription"/>
226
GetResourceString(nameof(
SR
.UnnecessaryMarshallingInfoTitle)),
227
GetResourceString(nameof(
SR
.UnnecessaryReturnMarshallingInfoMessage)),
231
description: GetResourceString(nameof(
SR
.UnnecessaryMarshallingInfoDescription)),
237
/// <inheritdoc cref="
SR
.SizeOfCollectionMustBeKnownAtMarshalTimeMessageOutParam"/>
241
GetResourceString(nameof(
SR
.SizeOfCollectionMustBeKnownAtMarshalTimeTitle)),
242
GetResourceString(nameof(
SR
.SizeOfCollectionMustBeKnownAtMarshalTimeMessageOutParam)),
247
/// <inheritdoc cref="
SR
.SizeOfCollectionMustBeKnownAtMarshalTimeMessageReturnValue"/>
251
GetResourceString(nameof(
SR
.SizeOfCollectionMustBeKnownAtMarshalTimeTitle)),
252
GetResourceString(nameof(
SR
.SizeOfCollectionMustBeKnownAtMarshalTimeMessageReturnValue)),
257
/// <inheritdoc cref="
SR
.LibraryImportUsageDoesNotFollowBestPracticesMessageWithDetails"/>
261
GetResourceString(nameof(
SR
.LibraryImportUsageDoesNotFollowBestPracticesTitle)),
262
GetResourceString(nameof(
SR
.LibraryImportUsageDoesNotFollowBestPracticesMessageWithDetails)),
303
return new LocalizableResourceString(resourceName,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.LibraryImportGenerator.SR));
LibraryImportGenerator.cs (4)
270
var generatorDiagnostics = new GeneratorDiagnosticsBag(new DiagnosticDescriptorProvider(), locations,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.LibraryImportGenerator.SR));
283
generatedDllImportAttr, symbol.Name,
SR
.InvalidStringMarshallingConfigurationMissingCustomType);
290
generatedDllImportAttr, symbol.Name,
SR
.InvalidStringMarshallingConfigurationNotCustom);
330
var diagnostics = new GeneratorDiagnosticsBag(new DiagnosticDescriptorProvider(), pinvokeStub.DiagnosticLocation,
SR
.ResourceManager, typeof(FxResources.Microsoft.Interop.LibraryImportGenerator.SR));