diff options
Diffstat (limited to 'crypto/src/cms/SignerInformationStore.cs')
-rw-r--r-- | crypto/src/cms/SignerInformationStore.cs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/crypto/src/cms/SignerInformationStore.cs b/crypto/src/cms/SignerInformationStore.cs index bc21f9d39..eb0dce6cf 100644 --- a/crypto/src/cms/SignerInformationStore.cs +++ b/crypto/src/cms/SignerInformationStore.cs @@ -1,9 +1,9 @@ -using System; using System.Collections.Generic; namespace Org.BouncyCastle.Cms { public class SignerInformationStore + : IEnumerable<SignerInformation> { private readonly IList<SignerInformation> m_all; private readonly IDictionary<SignerID, IList<SignerInformation>> m_table = @@ -63,16 +63,10 @@ namespace Org.BouncyCastle.Cms } /// <summary>The number of signers in the collection.</summary> - public int Count - { - get { return m_all.Count; } - } + public int Count => m_all.Count; /// <returns>An ICollection of all signers in the collection</returns> - public IList<SignerInformation> GetSigners() - { - return new List<SignerInformation>(m_all); - } + public IList<SignerInformation> GetSigners() => new List<SignerInformation>(m_all); /** * Return possible empty collection with signers matching the passed in SignerID @@ -87,5 +81,9 @@ namespace Org.BouncyCastle.Cms return new List<SignerInformation>(0); } + + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator(); + + public IEnumerator<SignerInformation> GetEnumerator() => GetSigners().GetEnumerator(); } } |