-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #657 from hjgraca/fix(logging)-typeinforesolver-no…
…n-aot chore: Remove TypeInfoResolver from non AOT mode.
- Loading branch information
Showing
5 changed files
with
98 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
libraries/src/AWS.Lambda.Powertools.Common/Utils/RuntimeFeatureWrapper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace AWS.Lambda.Powertools.Common.Utils; | ||
|
||
/// <summary> | ||
/// Wrapper for RuntimeFeature | ||
/// </summary> | ||
public static class RuntimeFeatureWrapper | ||
{ | ||
private static Func<bool> _isDynamicCodeSupportedFunc = () => RuntimeFeature.IsDynamicCodeSupported; | ||
|
||
/// <summary> | ||
/// Check to see if IsDynamicCodeSupported | ||
/// </summary> | ||
public static bool IsDynamicCodeSupported => _isDynamicCodeSupportedFunc(); | ||
|
||
// For testing purposes | ||
internal static void SetIsDynamicCodeSupported(bool value) | ||
{ | ||
_isDynamicCodeSupportedFunc = () => value; | ||
} | ||
|
||
// To reset after tests | ||
internal static void Reset() | ||
{ | ||
_isDynamicCodeSupportedFunc = () => RuntimeFeature.IsDynamicCodeSupported; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"Core": { | ||
"Logging": "1.6.0", | ||
"Logging": "1.6.1", | ||
"Metrics": "1.7.1", | ||
"Tracing": "1.5.1" | ||
}, | ||
"Utilities": { | ||
"Parameters": "1.3.0", | ||
"Idempotency": "1.2.2", | ||
"BatchProcessing": "1.1.2" | ||
"BatchProcessing": "1.2.0" | ||
} | ||
} |