From a69f610ef4d4f5dd0bd040956879a02022dcd603 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Thu, 5 Dec 2024 14:38:32 +0100 Subject: [PATCH] feat(CryptographerExtensions): Abfrage in SingleOrDefault verschieben --- .../Cryptographer/CryptographerExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalData.Core.Security/Cryptographer/CryptographerExtensions.cs b/DigitalData.Core.Security/Cryptographer/CryptographerExtensions.cs index 72f58e0..5c892c5 100644 --- a/DigitalData.Core.Security/Cryptographer/CryptographerExtensions.cs +++ b/DigitalData.Core.Security/Cryptographer/CryptographerExtensions.cs @@ -14,7 +14,7 @@ public static bool TryGet(this IEnumerable 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; }