File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/plugins/NodaMoneyTest Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 33
44namespace NodaMoneyTest ;
55
6+ [ System . Diagnostics . CodeAnalysis . SuppressMessage (
7+ "Critical Code Smell" ,
8+ "S2339:Public constant members should not be used" ,
9+ Justification = "<Pending>" ) ]
610public static class CurrencyCode
711{
812
@@ -30,8 +34,8 @@ public static class CurrencyCode
3034 public const string USD = "USD" ;
3135
3236 public static readonly FrozenDictionary < string , Currency > SupportedCurrency = typeof ( CurrencyCode ) . GetFields ( )
33- . Where ( o => o . IsLiteral )
34- . Select ( o => Currency . FromCode ( ( string ) o . GetValue ( null ) ! ) )
37+ . Where ( static o => o . IsLiteral )
38+ . Select ( static o => Currency . FromCode ( ( string ) ( o . GetValue ( null ) ?? throw new InvalidOperationException ( ) ) ) )
3539 . ToFrozenDictionary ( static o => o . Code , o => o ) ;
3640
3741 #endregion
You can’t perform that action at this time.
0 commit comments