Skip to content

Commit

Permalink
Fix #3173 trim warning for constantclass.intern (#3466)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterrsongg authored Sep 5, 2024
1 parent a13a7e2 commit 0565c12
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"core": {
"changeLogMessages": [
"Fix #3173. Add DynamicallyAccessedMembers to ConstantClass in Net8 to remove trim warnings."
],
"type": "patch",
"updateMinimum": true
}
}
3 changes: 3 additions & 0 deletions sdk/src/Core/Amazon.Runtime/ConstantClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ namespace Amazon.Runtime
/// <summary>
/// Base class for constant class that holds the value that will be sent to AWS for the static constants.
/// </summary>
#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)]
#endif
public class ConstantClass
{
static readonly object staticFieldsLock = new object();
Expand Down

0 comments on commit 0565c12

Please sign in to comment.