Provides a thread-safe generic collection that provides notifications when items are added or removed.
- Type Parameters:
-
T
-The type of collection item.
- Inheritance:
-
object
Collection<T>
Simple
Observable <T> objectCollection
Constructors
SimpleSynchronizedCollection()
Initializes an instance of the class.
Methods
ClearItems()
Removes all items from the collection.
InsertItem(int, T)
Inserts an item into the collection at the specified index.
Parameter | Type | Description |
---|---|---|
index | int | The index at which to insert the item. |
item | T | The item to insert. |
RemoveItem(int)
Removes the item at the specified index.
Parameter | Type | Description |
---|---|---|
index | int | The index of the item to remove. |
SetItem(int, T)
Replaces the item at the specified index.
Parameter | Type | Description |
---|---|---|
index | int | The index of the item to replace. |
item | T | The item with which to replace. |
TryFindItem(Func<T, bool>, out T)
Tries to find an item in the collection that matches the given predicate
.
Parameter | Type | Description |
---|---|---|
predicate | Func<T, bool> | The predicate which defines the item to be found. |
matchedItem | T | When successful, outputs the matched item; otherwise, the default value for the collection type (e.g. |
Returns
- bool:
true
if an item was matched and output throughmatchedItem
; otherwise,false
.
Inherited Members
- SimpleObservableCollection<T>.BlockReentrancy()
- SimpleObservableCollection<T>.CheckReadOnly()
- SimpleObservableCollection<T>.CheckReentrancy()
- SimpleObservableCollection<T>.OnItemAdded(int, T)
- SimpleObservableCollection<T>.OnItemAdding(int, T)
- SimpleObservableCollection<T>.OnItemRemoved(int, T)
- SimpleObservableCollection<T>.OnItemRemoving(int, T)
- SimpleObservableCollection<T>.IsReadOnly
- SimpleObservableCollection<T>.ItemAdding
- SimpleObservableCollection<T>.ItemAdded
- SimpleObservableCollection<T>.ItemRemoving
- SimpleObservableCollection<T>.ItemRemoved
-
object.
Get Type() -
object.
Memberwise Clone() -
object.
To String() -
object.
Equals(object) -
object.
Equals(object, object) -
object.
Reference Equals(object, object) -
object.
Get Hash Code()