From 99c61150fa44b12e600dbfd570bac22d7d054e61 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Fri, 1 Dec 2023 07:33:15 +1100 Subject: [PATCH] Update DynamicallyAccessedMembersAttribute.cs --- .../Trimming/DynamicallyAccessedMembersAttribute.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Polyfill/Trimming/DynamicallyAccessedMembersAttribute.cs b/src/Polyfill/Trimming/DynamicallyAccessedMembersAttribute.cs index e036a6e2..610449ec 100644 --- a/src/Polyfill/Trimming/DynamicallyAccessedMembersAttribute.cs +++ b/src/Polyfill/Trimming/DynamicallyAccessedMembersAttribute.cs @@ -27,12 +27,15 @@ namespace System.Diagnostics.CodeAnalysis; [ExcludeFromCodeCoverage] [DebuggerNonUserCode] [AttributeUsage( - validOn: Targets.Field | - Targets.ReturnValue | + validOn: Targets.Class | + Targets.Field | Targets.GenericParameter | + Targets.Interface | + Targets.Method | Targets.Parameter | Targets.Property | - Targets.Method, + Targets.ReturnValue | + Targets.Struct, Inherited = false)] #if PolyPublic public