BencodeElement.ObjectEnumerator Struct
Definition
- Assembly
- Bodu.Text.Bencode.dll
- Package
- Bodu.Text.Bencode 1.0.0
Enumerates the key/value pairs of an object BencodeElement in stored order.
public struct BencodeElement.ObjectEnumerator : IEnumerable<BencodeProperty>, IEnumerable, IEnumerator<BencodeProperty>, IEnumerator, IDisposable
- Implements
- Inherited Members
- Extension Methods
Remarks
The enumerator walks the object's contiguous subtree rows, advancing from each pair to the next by skipping the whole of the current value's subtree. It is a mutable struct; avoid copying it once enumeration has begun.
Properties
Current
Gets the property at the enumerator's current position.
public readonly BencodeProperty Current { get; }
Property Value
- BencodeProperty
The current property.
Methods
Dispose()
Releases the resources used by the enumerator. This enumerator holds no resources to release.
public readonly void Dispose()
GetEnumerator()
Returns this enumerator, enabling foreach over the object's properties.
public readonly BencodeElement.ObjectEnumerator GetEnumerator()
Returns
- BencodeElement.ObjectEnumerator
This enumerator positioned before the first property.
MoveNext()
Advances the enumerator to the next property of the object.
public bool MoveNext()
Returns
Reset()
Resets the enumerator to its initial position, before the first property.
public void Reset()
Explicit Interface Implementations
IEnumerable<BencodeProperty>.GetEnumerator()
Returns this enumerator, enabling foreach over the object's properties.
readonly IEnumerator<BencodeProperty> IEnumerable<BencodeProperty>.GetEnumerator()
Returns
- IEnumerator<BencodeProperty>
This enumerator positioned before the first property.
IEnumerable.GetEnumerator()
Returns this enumerator, enabling foreach over the object's properties.
readonly IEnumerator IEnumerable.GetEnumerator()
Returns
- IEnumerator
This enumerator positioned before the first property.
IEnumerator.Current
Gets the property at the enumerator's current position.
readonly object IEnumerator.Current { get; }
Returns
- object
The current property, boxed.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |