Class SourceList<T>
- Namespace
- DynamicData
- Assembly
- DynamicData.dll
An editable observable list.
public sealed class SourceList<T> : ISourceList<T>, IObservableList<T>, IDisposable where T : notnull
Type Parameters
T
The type of the object.
- Inheritance
-
SourceList<T>
- Implements
-
ISourceList<T>
- Extension Methods
Constructors
SourceList(IObservable<IChangeSet<T>>?)
Initializes a new instance of the SourceList<T> class.
public SourceList(IObservable<IChangeSet<T>>? source = null)
Parameters
source
IObservable<IChangeSet<T>>The source.
Properties
Count
Gets the count.
public int Count { get; }
Property Value
CountChanged
Gets observe the count changes, starting with the initial items count.
public IObservable<int> CountChanged { get; }
Property Value
Items
Gets items enumerable.
public IReadOnlyList<T> Items { get; }
Property Value
Methods
Connect(Func<T, bool>?)
Connect to the observable list and observe any changes starting with the list's initial items.
public IObservable<IChangeSet<T>> Connect(Func<T, bool>? predicate = null)
Parameters
Returns
- IObservable<IChangeSet<T>>
An observable which emits the change set.
Dispose()
public void Dispose()
Edit(Action<IExtendedList<T>>)
Edit the inner list within the list's internal locking mechanism.
public void Edit(Action<IExtendedList<T>> updateAction)
Parameters
updateAction
Action<IExtendedList<T>>The update action.
Preview(Func<T, bool>?)
Connect to the observable list and observe any changes before they are applied to the list. Unlike Connect(), the returned observable is not prepended with the lists initial items.
public IObservable<IChangeSet<T>> Preview(Func<T, bool>? predicate = null)
Parameters
Returns
- IObservable<IChangeSet<T>>
An observable which emits the change set.