SimpleImmutableList<T>

References
public sealed class SimpleImmutableList<T>
A cheap and quick immutable list optimised for the most common use case in GrasshopperIO. Adding and indexing values is fast, removing values is slow, as is adding values to a list which in the past already had values added to it.
T

Constructors

SimpleImmutableList

#
public SimpleImmutableList()

Properties

Backwards

#
Iterate over all elements from the highest to the lowest index.
public IEnumerable<T> Backwards { get; }

Count

#
Gets the number of items in this list.
public int Count { get; }

Forwards

#
Iterate over all elements from the lowest to the highest index.
public IEnumerable<T> Forwards { get; }

Indexers

this[]

#
Gets the indexed item.
public T this[
index
] { get; }

Methods

Add

#
Add an item to this list.
public SimpleImmutableList<T> Add(
T
item
)

AddRange

#
Add a collection of items to this list.
public SimpleImmutableList<T> AddRange(
items
)

RemoveAt

#
Remove an indexed element from this list.
public SimpleImmutableList<T> RemoveAt(
index
)

SetItem

#
Overwrite an element in this list.
public SimpleImmutableList<T> SetItem(
index,
T
item
)