Class ObservableList<T>
IList<T> where collection (and values eventually) changes are listenable.
Namespace: GGL.Observer
Assembly: GGL.dll
Syntax
public class ObservableList<T>
Type Parameters
Name | Description |
---|---|
T | Class or basic type. |
Constructors
| Edit this page View SourceObservableList(bool)
Create an observable empty list.
Declaration
public ObservableList(bool observeItem = true)
Parameters
Type | Name | Description |
---|---|---|
bool | observeItem | Decide if values specific changes are listened too. |
ObservableList(IEnumerable<Observable<T>>, bool)
Create an observable list from another.
Declaration
public ObservableList(IEnumerable<Observable<T>> collection, bool observeItem = true)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Observable<T>> | collection | Well... the starting list I guess? |
bool | observeItem | Decide if values specific changes are listened too. |
ObservableList(int, bool)
Create an observable list with capacity.
Declaration
public ObservableList(int capacity, bool observeItem = true)
Parameters
Type | Name | Description |
---|---|---|
int | capacity | List capacity. |
bool | observeItem | Decide if values specific changes are listened too. |
Methods
| Edit this page View SourceAdd(T)
Add raw item after setting it as an observable item
Declaration
public Observable<T> Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Returns
Type | Description |
---|---|
Observable<T> | Created observable item |
AddRange(params Observable<T>[])
Add several items
Declaration
public void AddRange(params Observable<T>[] items)
Parameters
Type | Name | Description |
---|---|---|
Observable<T>[] | items |
AddRange(params T[])
Add several items after setting them as observable items.
Declaration
public void AddRange(params T[] items)
Parameters
Type | Name | Description |
---|---|---|
T[] | items |
Events
| Edit this page View SourceOnChange
Declaration
public event Action OnChange
Event Type
Type | Description |
---|---|
Action | Event raised if collection is edited. |