feat(RSACryptographerList): Die Ausgabe der Indexer-Methode ist nicht null und wirft eine Ausnahme, wenn sie nicht gefunden wird.
This commit is contained in:
@@ -15,7 +15,9 @@ namespace DigitalData.Core.Security.Cryptographer
|
||||
_cryptographers = cryptographers;
|
||||
}
|
||||
|
||||
public TRSACryptographer? this[string key] => _cryptographers.SingleOrDefault(crypt => _keyGenerator(crypt) == key);
|
||||
public TRSACryptographer this[string key]
|
||||
=> _cryptographers.SingleOrDefault(crypt => _keyGenerator(crypt) == key)
|
||||
?? throw new InvalidOperationException($"No {typeof(TRSACryptographer).GetType().Name.TrimStart('I')} found with Key: {key}.");
|
||||
|
||||
public IEnumerator<TRSACryptographer> GetEnumerator() => _cryptographers.GetEnumerator();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user