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

78 lines
2.8 KiB
C#

using System;
using System.Collections;
namespace System.Security.Cryptography
{
/// <summary>Provides the ability to navigate through an <see cref="T:System.Security.Cryptography.OidCollection" /> object. This class cannot be inherited.</summary>
// Token: 0x020002A9 RID: 681
public sealed class OidEnumerator : IEnumerator
{
// Token: 0x060018E1 RID: 6369 RVA: 0x000554D0 File Offset: 0x000536D0
internal OidEnumerator(OidCollection collection)
{
this._collection = collection;
this._position = -1;
}
/// <summary>Gets the current <see cref="T:System.Security.Cryptography.Oid" /> object in an <see cref="T:System.Security.Cryptography.OidCollection" /> object.</summary>
/// <returns>The current <see cref="T:System.Security.Cryptography.Oid" /> object.</returns>
// Token: 0x170007CB RID: 1995
// (get) Token: 0x060018E2 RID: 6370 RVA: 0x000554E8 File Offset: 0x000536E8
object IEnumerator.Current
{
get
{
if (this._position < 0)
{
throw new ArgumentOutOfRangeException();
}
return this._collection[this._position];
}
}
/// <summary>Gets the current <see cref="T:System.Security.Cryptography.Oid" /> object in an <see cref="T:System.Security.Cryptography.OidCollection" /> object.</summary>
/// <returns>The current <see cref="T:System.Security.Cryptography.Oid" /> object in the collection.</returns>
// Token: 0x170007CC RID: 1996
// (get) Token: 0x060018E3 RID: 6371 RVA: 0x00055510 File Offset: 0x00053710
public Oid Current
{
get
{
if (this._position < 0)
{
throw new ArgumentOutOfRangeException();
}
return this._collection[this._position];
}
}
/// <summary>Advances to the next <see cref="T:System.Security.Cryptography.Oid" /> object in an <see cref="T:System.Security.Cryptography.OidCollection" /> object.</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: 0x060018E4 RID: 6372 RVA: 0x00055538 File Offset: 0x00053738
public bool MoveNext()
{
if (++this._position < this._collection.Count)
{
return true;
}
this._position = this._collection.Count - 1;
return false;
}
/// <summary>Sets an enumerator to its initial position.</summary>
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created.</exception>
// Token: 0x060018E5 RID: 6373 RVA: 0x0005557C File Offset: 0x0005377C
public void Reset()
{
this._position = -1;
}
// Token: 0x040013BF RID: 5055
private OidCollection _collection;
// Token: 0x040013C0 RID: 5056
private int _position;
}
}