mscorlib(4.0.0.0) API with additions
X509ExtensionEnumerator.cs
1 using System.Collections;
2 
4 {
6  public sealed class X509ExtensionEnumerator : IEnumerator
7  {
8  private X509ExtensionCollection m_extensions;
9 
10  private int m_current;
11 
15  public X509Extension Current => m_extensions[m_current];
16 
20  object IEnumerator.Current
21  {
22  get
23  {
24  return m_extensions[m_current];
25  }
26  }
27 
28  private X509ExtensionEnumerator()
29  {
30  }
31 
32  internal X509ExtensionEnumerator(X509ExtensionCollection extensions)
33  {
34  m_extensions = extensions;
35  m_current = -1;
36  }
37 
42  public bool MoveNext()
43  {
44  if (m_current == m_extensions.Count - 1)
45  {
46  return false;
47  }
48  m_current++;
49  return true;
50  }
51 
54  public void Reset()
55  {
56  m_current = -1;
57  }
58  }
59 }
Supports a simple iteration over a T:System.Security.Cryptography.X509Certificates....
Definition: __Canon.cs:3
void Reset()
Sets the enumerator to its initial position, which is before the first element in the T:System....
bool MoveNext()
Advances the enumerator to the next element in the T:System.Security.Cryptography....
Represents a collection of T:System.Security.Cryptography.X509Certificates.X509Extension objects....
object Current
Gets the element in the collection at the current position of the enumerator.
Definition: IEnumerator.cs:15
X509Extension Current
Gets the current element in the T:System.Security.Cryptography.X509Certificates.X509ExtensionCollecti...
Supports a simple iteration over a non-generic collection.
Definition: IEnumerator.cs:9