diff options
Diffstat (limited to 'crypto/src/asn1/isismtt/x509/ProfessionInfo.cs')
-rw-r--r-- | crypto/src/asn1/isismtt/x509/ProfessionInfo.cs | 43 |
1 files changed, 12 insertions, 31 deletions
diff --git a/crypto/src/asn1/isismtt/x509/ProfessionInfo.cs b/crypto/src/asn1/isismtt/x509/ProfessionInfo.cs index 32ad31d9a..87e2aaa4f 100644 --- a/crypto/src/asn1/isismtt/x509/ProfessionInfo.cs +++ b/crypto/src/asn1/isismtt/x509/ProfessionInfo.cs @@ -326,45 +326,26 @@ namespace Org.BouncyCastle.Asn1.IsisMtt.X509 get { return namingAuthority; } } - /** + /** * @return Returns the professionItems. */ - public virtual DirectoryString[] GetProfessionItems() - { - DirectoryString[] result = new DirectoryString[professionItems.Count]; - - for (int i = 0; i < professionItems.Count; ++i) - { - result[i] = DirectoryString.GetInstance(professionItems[i]); - } - - return result; - } + public virtual DirectoryString[] GetProfessionItems() + { + return professionItems.MapElements(DirectoryString.GetInstance); + } - /** + /** * @return Returns the professionOids. */ - public virtual DerObjectIdentifier[] GetProfessionOids() - { - if (professionOids == null) - { - return new DerObjectIdentifier[0]; - } - - DerObjectIdentifier[] result = new DerObjectIdentifier[professionOids.Count]; - - for (int i = 0; i < professionOids.Count; ++i) - { - result[i] = DerObjectIdentifier.GetInstance(professionOids[i]); - } - - return result; - } + public virtual DerObjectIdentifier[] GetProfessionOids() + { + return professionOids?.MapElements(DerObjectIdentifier.GetInstance) ?? new DerObjectIdentifier[0]; + } - /** + /** * @return Returns the registrationNumber. */ - public virtual string RegistrationNumber + public virtual string RegistrationNumber { get { return registrationNumber; } } |