feat(CryptographerExtensions): Abfrage in SingleOrDefault verschieben

This commit is contained in:
Developer 02 2024-12-05 14:38:32 +01:00
parent 016d8bdcf2
commit a69f610ef4

View File

@ -14,7 +14,7 @@
public static bool TryGet<TRSACryptographer>(this IEnumerable<TRSACryptographer> cryptographers, string issuer, string audience, out TRSACryptographer? cryptographer) where TRSACryptographer : RSACryptographer
{
cryptographer = cryptographers.Where(c => c.Issuer == issuer && c.Audience == audience).SingleOrDefault();
cryptographer = cryptographers.SingleOrDefault(c => c.Issuer == issuer && c.Audience == audience);
return cryptographer is not null;
}