Class ObservableRangeCollection<T>
Represents a dynamic data collection that provides notifications when items get added, removed, or when the whole list is refreshed.
Inheritance
Namespace: ISynergy.Framework.Core.Collections
Assembly: ISynergy.Framework.Core.dll
Syntax
public class ObservableRangeCollection<T> : ObservableCollection<T>
Type Parameters
Name | Description |
---|---|
T |
Constructors
View SourceObservableRangeCollection()
Initializes a new instance of the System.Collections.ObjectModel.ObservableCollection(Of T) class.
Declaration
public ObservableRangeCollection()
ObservableRangeCollection(IEnumerable<T>)
Initializes a new instance of the System.Collections.ObjectModel.ObservableCollection(Of T) class that contains elements copied from the specified collection.
Declaration
public ObservableRangeCollection(IEnumerable<T> collection)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | collection | collection: The collection from which the elements are copied. |
Methods
View SourceAddRange(IEnumerable<T>, NotifyCollectionChangedAction)
Adds the elements of the specified collection to the end of the ObservableCollection(Of T).
Declaration
public void AddRange(IEnumerable<T> collection, NotifyCollectionChangedAction notificationMode = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | collection | The collection. |
NotifyCollectionChangedAction | notificationMode | The notification mode. |
RemoveRange(IEnumerable<T>, NotifyCollectionChangedAction)
Removes the first occurence of each item in the specified collection from ObservableCollection(Of T). NOTE: with notificationMode = Remove, removed items starting index is not set because items are not guaranteed to be consecutive.
Declaration
public void RemoveRange(IEnumerable<T> collection, NotifyCollectionChangedAction notificationMode = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | collection | The collection. |
NotifyCollectionChangedAction | notificationMode | The notification mode. |
Replace(T)
Clears the current collection and replaces it with the specified item.
Declaration
public void Replace(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item. |
ReplaceRange(IEnumerable<T>)
Clears the current collection and replaces it with the specified collection.
Declaration
public void ReplaceRange(IEnumerable<T> collection)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | collection | The collection. |