Files
Dec2017-Script-Dump/mscorlib/System/Security/AccessControl/AceEnumerator.cs
T
2026-06-04 11:42:34 +02:00

67 lines
2.4 KiB
C#

using System;
using System.Collections;
namespace System.Security.AccessControl
{
/// <summary>Provides the ability to iterate through the access control entries (ACEs) in an access control list (ACL). </summary>
// Token: 0x020004A6 RID: 1190
public sealed class AceEnumerator : IEnumerator
{
// Token: 0x06002CAA RID: 11434 RVA: 0x00092E34 File Offset: 0x00091034
internal AceEnumerator(GenericAcl owner)
{
this.owner = owner;
}
// Token: 0x170008B7 RID: 2231
// (get) Token: 0x06002CAB RID: 11435 RVA: 0x00092E4C File Offset: 0x0009104C
object IEnumerator.Current
{
get
{
return this.Current;
}
}
/// <summary>Gets the current element in the <see cref="T:System.Security.AccessControl.GenericAce" /> collection. This property gets the type-friendly version of the object. </summary>
/// <returns>The current element in the <see cref="T:System.Security.AccessControl.GenericAce" /> collection.</returns>
// Token: 0x170008B8 RID: 2232
// (get) Token: 0x06002CAC RID: 11436 RVA: 0x00092E54 File Offset: 0x00091054
public GenericAce Current
{
get
{
return (this.current >= 0) ? this.owner[this.current] : null;
}
}
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Security.AccessControl.GenericAce" /> collection.</summary>
/// <returns>true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.</returns>
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created.</exception>
// Token: 0x06002CAD RID: 11437 RVA: 0x00092E7C File Offset: 0x0009107C
public bool MoveNext()
{
if (this.current + 1 == this.owner.Count)
{
return false;
}
this.current++;
return true;
}
/// <summary>Sets the enumerator to its initial position, which is before the first element in the <see cref="T:System.Security.AccessControl.GenericAce" /> collection.</summary>
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created.</exception>
// Token: 0x06002CAE RID: 11438 RVA: 0x00092EA8 File Offset: 0x000910A8
public void Reset()
{
this.current = -1;
}
// Token: 0x0400116D RID: 4461
private GenericAcl owner;
// Token: 0x0400116E RID: 4462
private int current = -1;
}
}