Table of Contents

Struct RegionsIterator

Namespace
Uncreated.Warfare.Util.Region
Assembly
Uncreated.Warfare.dll

Iterate through all SDG.Unturned.Regions in a set.

public struct RegionsIterator : IEnumerator<RegionCoord>, IEnumerator, IDisposable, IEnumerable<RegionCoord>, IEnumerable
Implements
IEnumerator<RegionCoord>
IEnumerable<RegionCoord>
Inherited Members
Extension Methods

Remarks

Stolen from DevkitServer.

Constructors

RegionsIterator()

public RegionsIterator()

RegionsIterator(bool)

public RegionsIterator(bool yPrimary = false)

Parameters

yPrimary bool

Properties

Current

Gets the element in the collection at the current position of the enumerator.

public RegionCoord Current { get; }

Property Value

RegionCoord

The element in the collection at the current position of the enumerator.

Methods

GetEnumerator()

public readonly RegionsIterator GetEnumerator()

Returns

RegionsIterator

MoveNext()

Advances the enumerator to the next element of the collection.

public bool MoveNext()

Returns

bool

true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.

Exceptions

InvalidOperationException

The collection was modified after the enumerator was created.

Reset()

Sets the enumerator to its initial position, which is before the first element in the collection.

public void Reset()

Exceptions

InvalidOperationException

The collection was modified after the enumerator was created.