diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-14 14:32:40 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-14 14:32:40 +0700 |
commit | eb89e9957f34982f75f36ef237166ccbc2042768 (patch) | |
tree | 3166947175b520554f5a8363f75f92ba43794b8f /crypto/src/asn1/crmf/Controls.cs | |
parent | (D)TLS: Refactoring around CertificateType support (diff) | |
download | BouncyCastle.NET-ed25519-eb89e9957f34982f75f36ef237166ccbc2042768.tar.xz |
Refactor using MapElements
Diffstat (limited to 'crypto/src/asn1/crmf/Controls.cs')
-rw-r--r-- | crypto/src/asn1/crmf/Controls.cs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crypto/src/asn1/crmf/Controls.cs b/crypto/src/asn1/crmf/Controls.cs index 70b48a959..ac568d741 100644 --- a/crypto/src/asn1/crmf/Controls.cs +++ b/crypto/src/asn1/crmf/Controls.cs @@ -33,12 +33,7 @@ namespace Org.BouncyCastle.Asn1.Crmf public virtual AttributeTypeAndValue[] ToAttributeTypeAndValueArray() { - AttributeTypeAndValue[] result = new AttributeTypeAndValue[content.Count]; - for (int i = 0; i != result.Length; ++i) - { - result[i] = AttributeTypeAndValue.GetInstance(content[i]); - } - return result; + return content.MapElements(AttributeTypeAndValue.GetInstance); } /** |