summary refs log tree commit diff
path: root/crypto/src/asn1/teletrust
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-27 02:19:14 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-27 02:19:14 +0700
commit4ea1816cffd5c8663bc9ae1234df0a70ef23fcd6 (patch)
treeeb4fe294ef230435928a573fadef3047b4466e9b /crypto/src/asn1/teletrust
parentImplement generic IEnumerable in ASN.1 classes (diff)
downloadBouncyCastle.NET-ed25519-4ea1816cffd5c8663bc9ae1234df0a70ef23fcd6.tar.xz
Generics migration work
Diffstat (limited to 'crypto/src/asn1/teletrust')
-rw-r--r--crypto/src/asn1/teletrust/TeleTrusTNamedCurves.cs6
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>