diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-27 02:19:14 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-27 02:19:14 +0700 |
commit | 4ea1816cffd5c8663bc9ae1234df0a70ef23fcd6 (patch) | |
tree | eb4fe294ef230435928a573fadef3047b4466e9b /crypto/src/asn1/teletrust | |
parent | Implement generic IEnumerable in ASN.1 classes (diff) | |
download | BouncyCastle.NET-ed25519-4ea1816cffd5c8663bc9ae1234df0a70ef23fcd6.tar.xz |
Generics migration work
Diffstat (limited to 'crypto/src/asn1/teletrust')
-rw-r--r-- | crypto/src/asn1/teletrust/TeleTrusTNamedCurves.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/asn1/teletrust/TeleTrusTNamedCurves.cs b/crypto/src/asn1/teletrust/TeleTrusTNamedCurves.cs index b863babce..5edb24045 100644 --- a/crypto/src/asn1/teletrust/TeleTrusTNamedCurves.cs +++ b/crypto/src/asn1/teletrust/TeleTrusTNamedCurves.cs @@ -527,21 +527,21 @@ namespace Org.BouncyCastle.Asn1.TeleTrust /// <param name="oid">The <see cref="DerObjectIdentifier">OID</see> for the curve.</param> public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid) { - return curves.TryGetValue(oid, out var holder) ? holder : null; + return CollectionUtilities.GetValueOrNull(curves, oid); } /// <summary>Look up the name of the curve with the given <see cref="DerObjectIdentifier">OID</see>.</summary> /// <param name="oid">The <see cref="DerObjectIdentifier">OID</see> for the curve.</param> public static string GetName(DerObjectIdentifier oid) { - return names.TryGetValue(oid, out var name) ? name : null; + return CollectionUtilities.GetValueOrNull(names, oid); } /// <summary>Look up the <see cref="DerObjectIdentifier">OID</see> of the curve with the given name.</summary> /// <param name="name">The name of the curve.</param> public static DerObjectIdentifier GetOid(string name) { - return objIds.TryGetValue(name, out var oid) ? oid : null; + return CollectionUtilities.GetValueOrNull(objIds, name); } /// <summary>Enumerate the available curve names in this registry.</summary> |