@@ -14,7 +14,12 @@ public IServiceMetadata ExtractServiceMetadata<TClient>() where TClient : Amazon
1414 [ RequiresDynamicCode ( "Accesses private field 'serviceMetadata' with reflection; not safe for Native AOT." ) ,
1515 RequiresUnreferencedCode ( "Reflection may break when IL trimming removes private members. We’re migrating to a source‑generated path in vNext." ) ]
1616#endif
17- public IServiceMetadata ExtractServiceMetadata ( Type clientType )
17+ public IServiceMetadata ExtractServiceMetadata (
18+ #if NET8_0_OR_GREATER
19+ [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . NonPublicFields ) ]
20+ #endif
21+ Type clientType
22+ )
1823 {
1924 if ( clientType == null )
2025 {
@@ -41,7 +46,13 @@ public ClientConfig CreateClientConfig<TClient>() where TClient : AmazonServiceC
4146 [ RequiresDynamicCode ( "Uses Activator.CreateInstance on derived ClientConfig types; not safe for Native AOT." ) ,
4247 RequiresUnreferencedCode ( "Reflection may break when IL trimming removes private members. We’re migrating to a source‑generated path in vNext." ) ]
4348#endif
44- public ClientConfig CreateClientConfig ( Type clientType )
49+ public ClientConfig CreateClientConfig (
50+ #if NET8_0_OR_GREATER
51+ [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicConstructors ) ]
52+ #endif
53+ Type clientType
54+
55+ )
4556 {
4657 if ( clientType == null )
4758 {
@@ -58,7 +69,12 @@ public ClientConfig CreateClientConfig(Type clientType)
5869 [ RequiresDynamicCode ( "Reflects over Config.RegionEndpoint property; not safe for Native AOT." ) ,
5970 RequiresUnreferencedCode ( "Reflection may break when IL trimming removes private members. We’re migrating to a source‑generated path in vNext." ) ]
6071#endif
61- public void SetClientRegion ( AmazonServiceClient amazonServiceClient , string systemName )
72+ public void SetClientRegion (
73+ #if NET8_0_OR_GREATER
74+ [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicProperties ) ]
75+ #endif
76+ AmazonServiceClient amazonServiceClient ,
77+ string systemName )
6278 {
6379 if ( amazonServiceClient == null )
6480 {
@@ -75,7 +91,12 @@ public void SetClientRegion(AmazonServiceClient amazonServiceClient, string syst
7591 [ RequiresDynamicCode ( "Reflects over ForcePathStyle property; not safe for Native AOT." ) ,
7692 RequiresUnreferencedCode ( "Reflection may break when IL trimming removes private members. We’re migrating to a source‑generated path in vNext." ) ]
7793#endif
78- public bool SetForcePathStyle ( ClientConfig clientConfig , bool value = true )
94+ public bool SetForcePathStyle (
95+ #if NET8_0_OR_GREATER
96+ [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicProperties ) ]
97+ #endif
98+ ClientConfig clientConfig ,
99+ bool value = true )
79100 {
80101 if ( clientConfig == null )
81102 {
0 commit comments