Skip to content

Get Sansar

Script API

GenericEnumerable<T>

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Class Namespace Sansar.Utility Inherits IEnumerable<T>

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 : class

Type 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

KindMembers
ConstructorsGenericEnumerable
PropertiesCount
MethodsGetEnumerator · 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.

ParameterTypeDescription
countuintTotal number of items in the collection.
getItemGenericEnumerable<T>.GetItemDelegate 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.