Namespace: SpawnDev.SpawnJS.JSObjects
Inherits: SpawnJSObject
Source: JSObjects/Iterator.cs
MDN Reference: Iterator on MDN
Iteration protocols aren't new built-ins or syntax, but protocols. These protocols can be implemented by any object by following some conventions. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols
| Signature | Description |
|---|---|
Iterator(SpawnJSObjectReference _ref) |
Deserialization constructor |
Iterator(SpawnJSObjectReference _ref) |
Deserialization constructor |
| Method | Return Type | Description |
|---|---|---|
Next() |
IteratorResult |
Returns the next IteratorResult |
ToList() |
List<TValue> |
Returns all the enumerated results as a List |
ToArray() |
TValue[] |
Returns all the enumerated results as a .Net Array |
ToEnumerable() |
IEnumerable<TValue> |
Returns an IEnumerable<TValue> |