Interface IGenerator
- Namespace
- Gamelogic.Extensions.Algorithms
- Assembly
- Assembly-CSharp.dll
A generator can produce an infinite sequence of objects.
[Version(2, 0, 0)]
public interface IGenerator
- Extension Methods
Properties
Current
Gets the element last generated by this generator.
object Current { get; }
Property Value
Remarks
It is always (in theory) valid to query this property. When called right after the generator is constructed (before calls to move next), it gives the first element of this generator.
In practice, it is possible for a generator to overflow.
Methods
CloneAndRestart()
Clones the generator and returns the clone in a restarted state.
IGenerator CloneAndRestart()
Returns
MoveNext()
Generates the next element.
void MoveNext()
See Also
IGenerator<TResult>