mscorlib(4.0.0.0) API with additions
AceEnumerator.cs
1 using System.Collections;
2 
4 {
6  public sealed class AceEnumerator : IEnumerator
7  {
8  private int _current;
9 
10  private readonly GenericAcl _acl;
11 
15  object IEnumerator.Current
16  {
17  get
18  {
19  if (_current == -1 || _current >= _acl.Count)
20  {
21  throw new InvalidOperationException(Environment.GetResourceString("Arg_InvalidOperationException"));
22  }
23  return _acl[_current];
24  }
25  }
26 
29  public GenericAce Current => ((IEnumerator)this).Current as GenericAce;
30 
31  internal AceEnumerator(GenericAcl collection)
32  {
33  if (collection == null)
34  {
35  throw new ArgumentNullException("collection");
36  }
37  _acl = collection;
38  Reset();
39  }
40 
45  public bool MoveNext()
46  {
47  _current++;
48  return _current < _acl.Count;
49  }
50 
53  public void Reset()
54  {
55  _current = -1;
56  }
57  }
58 }
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
Definition: __Canon.cs:3
Represents an Access Control Entry (ACE), and is the base class for all other ACE classes.
Definition: GenericAce.cs:6
bool MoveNext()
Advances the enumerator to the next element of the T:System.Security.AccessControl....
Provides information about, and means to manipulate, the current environment and platform....
Definition: Environment.cs:21
object Current
Gets the element in the collection at the current position of the enumerator.
Definition: IEnumerator.cs:15
Provides the ability to iterate through the access control entries (ACEs) in an access control list (...
Definition: AceEnumerator.cs:6
Represents an access control list (ACL) and is the base class for the T:System.Security....
Definition: GenericAcl.cs:6
The exception that is thrown when a method call is invalid for the object's current state.
void Reset()
Sets the enumerator to its initial position, which is before the first element in the T:System....
Supports a simple iteration over a non-generic collection.
Definition: IEnumerator.cs:9