Table of Contents

Class ObservableList<T>

Namespace
GrindFest
Assembly
GrindFest.dll

A minimal observable wrapper around List<T>. Fires Changed on every mutation (Add, Remove, Clear, indexer set). Zero-allocation event — uses Action with no args.

Designed for OneJS bridge: JS subscribes via onejs.subscribe(list, 'Changed', cb).

Unity-serializable: the inner List is serialized by Unity.

[Serializable]
public class ObservableList<T> : IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable

Type Parameters

T
Inheritance
object
ObservableList<T>
Implements

Constructors

ObservableList()
ObservableList(IEnumerable<T>)

Creates a new list initialized with items from the collection (copies).

ObservableList(int)

Properties

Count
IsReadOnly
this[int]

Methods

Add(T)
AddRange(IEnumerable<T>)
AsList()
Clear()
Contains(T)
CopyTo(T[], int)
Exists(Predicate<T>)
Find(Predicate<T>)
FindAll(Predicate<T>)
ForEach(Action<T>)
GetEnumerator()
IndexOf(T)
Insert(int, T)
Remove(T)
RemoveAll(Predicate<T>)
RemoveAt(int)
Reverse()
Sort()
Sort(IComparer<T>)
Sort(Comparison<T>)

Events

Changed

Fires after every mutation (Add, Remove, Clear, Replace).