The GenericEnumerable takes a delegate which accesses items in a Array-like collection by index and allows iteration through enumeration.
public class GenericEnumerable<T> : IEnumerable<T> where T : classType parameters: T: The type of objects returned by GenericEnumerable<T>.GetItem
Remarks
This is used by some API methods to allow for enumerations on some colletions.
Members at a glance
| Kind | Members |
|---|---|
| Constructors | GenericEnumerable |
| Properties | Count |
| Methods | GetEnumerator · System#Collections#IEnumerable#GetEnumerator |
Constructors
GenericEnumerable
public GenericEnumerable(
uint count,
GenericEnumerable<T>.GetItem getItem
)Initializes the enumerable with an item count and an accessor delegate.
| Parameter | Type | Description |
|---|---|---|
count | uint | Total number of items in the collection. |
getItem | GenericEnumerable<T>.GetItem | Delegate which retrieves an item from a collection by index. |
Remarks
If the item count changes or items change index the enumeration may be invalidated.
Properties
Count
public uint Count { get; }The total number of items in the collection.
Value: uint — The total number of items in the collection.
Remarks
Set by the constructor.
Methods
GetEnumerator
public IEnumerator<T> GetEnumerator()Returns an enumerator that iterates through the collection.
Returns: IEnumerator<T> — An enumerator that can be used to iterate through the collection.
Remarks
If the item count changes or items change index the enumeration may be invalidated.
System#Collections#IEnumerable#GetEnumerator
IEnumerator System.Collections.IEnumerable.GetEnumerator()Returns an enumerator that iterates through the collection.
Returns: IEnumerator — An enumerator that can be used to iterate through the collection.
Remarks
If the item count changes or items change index the enumeration may be invalidated.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.