Commit 4c8bca8 1 parent 896632f commit 4c8bca8 Copy full SHA for 4c8bca8
File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ internal static void Configure(RootCommand rootCommand)
37
37
public static async Task < int > KeyGen ( KeyGenCommandOptions options )
38
38
{
39
39
Console . WriteLine ( "Generating new public/private key pair..." ) ;
40
- using ( RSA rsa = new RSACryptoServiceProvider ( 2048 ) )
40
+ using ( var rsa = new RSACryptoServiceProvider ( 2048 ) )
41
41
{
42
42
var publicKeyFilename = string . IsNullOrEmpty ( options . PublicKeyFile ) ? "public.key" : options . PublicKeyFile ;
43
43
Console . WriteLine ( $ "Saving public key to { publicKeyFilename } ") ;
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public static string Serialize(Bom bom)
61
61
csv . WriteField ( "SwidTextEncoding" ) ;
62
62
csv . WriteField ( "SwidTextContent" ) ;
63
63
csv . WriteField ( "SwidUrl" ) ;
64
- var hashAlgorithms = Enum . GetValues ( typeof ( Hash . HashAlgorithm ) ) . Cast < Hash . HashAlgorithm > ( ) ;
64
+ var hashAlgorithms = Enum . GetValues ( typeof ( Hash . HashAlgorithm ) ) . Cast < Hash . HashAlgorithm > ( ) . ToList ( ) ;
65
65
foreach ( var hashAlgorithm in hashAlgorithms )
66
66
{
67
67
if ( hashAlgorithm != Hash . HashAlgorithm . Null )
@@ -221,7 +221,7 @@ public static Bom Deserialize(string csv)
221
221
if ( ! string . IsNullOrEmpty ( hash . Content ) ) hashes . Add ( hash ) ;
222
222
}
223
223
}
224
- if ( hashes . Any ( ) ) component . Hashes = hashes ;
224
+ if ( hashes . Count != 0 ) component . Hashes = hashes ;
225
225
226
226
var componentLicenses = new List < LicenseChoice > ( ) ;
227
227
var licenseExpressions = csvReader . GetField ( "LicenseExpressions" ) ? . Split ( ',' ) ;
@@ -261,7 +261,7 @@ public static Bom Deserialize(string csv)
261
261
}
262
262
} ) ;
263
263
}
264
- if ( componentLicenses . Any ( ) ) component . Licenses = componentLicenses ;
264
+ if ( componentLicenses . Count != 0 ) component . Licenses = componentLicenses ;
265
265
266
266
bom . Components . Add ( component ) ;
267
267
}
You can’t perform that action at this time.
0 commit comments