Class ObservableCollectionAdaptor<T>
- Namespace
- DynamicData.Binding
- Assembly
- DynamicData.dll
Adaptor to reflect a change set into an observable list.
public class ObservableCollectionAdaptor<T> : IChangeSetAdaptor<T> where T : notnull
Type Parameters
T
The type of the item.
- Inheritance
-
ObservableCollectionAdaptor<T>
- Implements
Remarks
Initializes a new instance of the ObservableCollectionAdaptor<T> class.
Constructors
ObservableCollectionAdaptor(IObservableCollection<T>)
Initializes a new instance of the ObservableCollectionAdaptor<T> class.
public ObservableCollectionAdaptor(IObservableCollection<T> collection)
Parameters
collection
IObservableCollection<T>The collection.
Exceptions
- ArgumentNullException
collection.
ObservableCollectionAdaptor(IObservableCollection<T>, BindingOptions)
Initializes a new instance of the ObservableCollectionAdaptor<T> class.
public ObservableCollectionAdaptor(IObservableCollection<T> collection, BindingOptions options)
Parameters
collection
IObservableCollection<T>The collection.
options
BindingOptionsThe binding options.
Exceptions
- ArgumentNullException
collection.
ObservableCollectionAdaptor(IObservableCollection<T>, int, bool, bool)
Adaptor to reflect a change set into an observable list.
public ObservableCollectionAdaptor(IObservableCollection<T> collection, int refreshThreshold, bool allowReplace = true, bool resetOnFirstTimeLoad = true)
Parameters
collection
IObservableCollection<T>The collection.
refreshThreshold
intThe number of changes before a Reset event is used.
allowReplace
boolUse replace instead of remove / add for updates.
resetOnFirstTimeLoad
boolShould a reset be fired for a first time load.This option is due to historic reasons where a reset would be fired for the first time load regardless of the number of changes.
Remarks
Initializes a new instance of the ObservableCollectionAdaptor<T> class.
Exceptions
- ArgumentNullException
collection.
Methods
Adapt(IChangeSet<T>)
Maintains the specified collection from the changes.
public void Adapt(IChangeSet<T> changes)
Parameters
changes
IChangeSet<T>The changes.
Exceptions
- ArgumentNullException
collection.