Table of Contents

TomlElement.ObjectEnumerator Struct

Definition

Namespace
Bodu.Text.Toml.Document
Assembly
Bodu.Text.Toml.dll
Package
Bodu.Text.Toml 1.0.0
Source
TomlElement.ArrayEnumerator.cs

Enumerates the key/value pairs of a table TomlElement in stored order.

public struct TomlElement.ObjectEnumerator : IEnumerable<TomlProperty>, IEnumerable, IEnumerator<TomlProperty>, IEnumerator, IDisposable
Implements
Inherited Members
Extension Methods

Remarks

The enumerator walks the table'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 TomlProperty Current { get; }

Property Value

TomlProperty

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 table's properties.

public readonly TomlElement.ObjectEnumerator GetEnumerator()

Returns

TomlElement.ObjectEnumerator

This enumerator positioned before the first property.

MoveNext()

Advances the enumerator to the next property of the table.

public bool MoveNext()

Returns

bool

true when the enumerator advanced to a further property; false when the end of the table was reached.

Reset()

Resets the enumerator to its initial position, before the first property.

public void Reset()

Explicit Interface Implementations

IEnumerable<TomlProperty>.GetEnumerator()

Returns this enumerator, enabling foreach over the table's properties.

readonly IEnumerator<TomlProperty> IEnumerable<TomlProperty>.GetEnumerator()

Returns

IEnumerator<TomlProperty>

This enumerator positioned before the first property.

IEnumerable.GetEnumerator()

Returns this enumerator, enabling foreach over the table'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

ProductVersions
.NET8, 10