diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-26 22:25:10 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-26 22:25:10 +0700 |
commit | 3535fc1c1b65880796f215a880ddab8cda70f516 (patch) | |
tree | ad9587bc64d658aca4e22d0aa3f88a4bf4dcf994 /crypto/src/asn1/LazyDLEnumerator.cs | |
parent | Replace IX509Store API with new store/selector API (diff) | |
download | BouncyCastle.NET-ed25519-3535fc1c1b65880796f215a880ddab8cda70f516.tar.xz |
Implement generic IEnumerable in ASN.1 classes
Diffstat (limited to 'crypto/src/asn1/LazyDLEnumerator.cs')
-rw-r--r-- | crypto/src/asn1/LazyDLEnumerator.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/crypto/src/asn1/LazyDLEnumerator.cs b/crypto/src/asn1/LazyDLEnumerator.cs index efe383e3d..5e1be8228 100644 --- a/crypto/src/asn1/LazyDLEnumerator.cs +++ b/crypto/src/asn1/LazyDLEnumerator.cs @@ -1,11 +1,12 @@ using System; using System.Collections; +using System.Collections.Generic; using System.IO; namespace Org.BouncyCastle.Asn1 { internal class LazyDLEnumerator - : IEnumerator + : IEnumerator<Asn1Encodable> { private readonly byte[] m_contents; @@ -19,7 +20,12 @@ namespace Org.BouncyCastle.Asn1 Reset(); } - public object Current + object IEnumerator.Current + { + get { return Current; } + } + + public Asn1Encodable Current { get { @@ -30,6 +36,10 @@ namespace Org.BouncyCastle.Asn1 } } + public virtual void Dispose() + { + } + public bool MoveNext() { return null != (this.m_current = ReadObject()); |