mscorlib(4.0.0.0) API with additions
ApplicationTrustEnumerator.cs
1 using System.Collections;
3 
5 {
7  [ComVisible(true)]
8  public sealed class ApplicationTrustEnumerator : IEnumerator
9  {
10  [SecurityCritical]
11  private ApplicationTrustCollection m_trusts;
12 
13  private int m_current;
14 
18  {
19  [SecuritySafeCritical]
20  get
21  {
22  return m_trusts[m_current];
23  }
24  }
25 
28  object IEnumerator.Current
29  {
30  [SecuritySafeCritical]
31  get
32  {
33  return m_trusts[m_current];
34  }
35  }
36 
37  private ApplicationTrustEnumerator()
38  {
39  }
40 
41  [SecurityCritical]
42  internal ApplicationTrustEnumerator(ApplicationTrustCollection trusts)
43  {
44  m_trusts = trusts;
45  m_current = -1;
46  }
47 
51  [SecuritySafeCritical]
52  public bool MoveNext()
53  {
54  if (m_current == m_trusts.Count - 1)
55  {
56  return false;
57  }
58  m_current++;
59  return true;
60  }
61 
63  public void Reset()
64  {
65  m_current = -1;
66  }
67  }
68 }
Represents the enumerator for T:System.Security.Policy.ApplicationTrust objects in the T:System....
Encapsulates security decisions about an application. This class cannot be inherited.
Definition: __Canon.cs:3
bool MoveNext()
Moves to the next element in the T:System.Security.Policy.ApplicationTrustCollection collection.
ApplicationTrust Current
Gets the current T:System.Security.Policy.ApplicationTrust object in the T:System....
object Current
Gets the element in the collection at the current position of the enumerator.
Definition: IEnumerator.cs:15
void Reset()
Resets the enumerator to the beginning of the T:System.Security.Policy.ApplicationTrustCollection col...
Represents a collection of T:System.Security.Policy.ApplicationTrust objects. This class cannot be in...
Supports a simple iteration over a non-generic collection.
Definition: IEnumerator.cs:9