List of items of class T. From this list partitions can be created, which basically are views inside this list, which have certain selection criterions. See remarks for details.
Say you have two classes, A and B, both having the base class T. Then you can create a PartionableList, holding items of class A as well as items of class B. From this list you then can create a partition, i.e. a view, that shows only items of class A, and another partition, that shows only items of class B. These partitions support all list operations, including deletion, insertion, movement, and setting of items. These list operations are propagated to the main list. Of course, it will cause an exception if you try to insert items of class B into the partition of class A (and vice versa). When you set or insert an item in a partition, that item has to fulfill the selection criterion for the particular partition.
Constructor | Description |
Full Usage:
PartitionableList()
|
|
|
|
Instance member | Description |
|
|
Full Usage:
this.CreatePartialView
Parameters:
Func<'T, bool>
-
The selection condition.
If this function returns true on an item of the original collection, that item is member of the partial view.
Note that during the lifetime of the partition, the behaviour of the selection criterion must not change.
Returns: IObservableList<'T>
List of items of the original collection, that fullfils the selection condition. The returned list is automatically updated, when the original collection changed or when
the user changed the partial view itself.
|
Creates a partial view. A partial view is a view of the list of items of the original collection, that fulfill a certain condition.
|
Full Usage:
this.CreatePartialView
Parameters:
Func<'T, bool>
-
The selection condition.
If this function returns true on an item of the original collection, that item is member of the partial view.
Note that during the lifetime of the partition, the behaviour of the selection criterion must not change.
actionBeforeInsertion : Action<'T>
-
Action that is executed on an item before it is inserted.
Returns: IObservableList<'T>
List of items of the original collection, that fullfils the selection condition. The returned list is automatically updated, when the original collection changed or when
the user changed the partial view itself.
|
Creates a partial view. A partial view is a view of the list of items of the original collection, that fulfill a certain condition.
|
Full Usage:
this.CreatePartialViewOfType
Returns: IObservableList<'M>
View of all elements of type M of the original collection.
|
Creates the partial view that consists of all elements in the original collection that are of type M.
|
Full Usage:
this.CreatePartialViewOfType
Parameters:
Action<'M>
-
Action that is executed on an item before it is inserted.
Returns: IObservableList<'M>
View of all elements of type M of the original collection.
|
Creates the partial view that consists of all elements in the original collection that are of type M.
|
Full Usage:
this.CreatePartialViewOfType
Parameters:
Func<'M, bool>
-
The selection criterium.
Returns: IObservableList<'M>
|
Creates the partial view that consisist of elements of type M that fullfil a given condition.
|
Full Usage:
this.CreatePartialViewOfType
Parameters:
Func<'M, bool>
-
The selection criterium. If this function applied to an element returns true , this element is included into the partial view.
actionBeforeInsertion : Action<'M>
-
Action that is called before elements are included into the partial view. Note that this action is executed only if items are directly added into the partial view,
but it is not executed if items are indirectly included into the partial view by adding items that fullfil the selection criterium to the parent list.
Returns: IObservableList<'M>
|
Creates the partial view that consisist of elements of type M that fullfil a condition provided by the argument selectionCriterium.
|
|
Gets a token that will temporarily disable the CollectionChanged events from this collection. The best practice is to use this token inside a using statement, because at the end of the using statement the Dispose function of the token is called automatically, which then reenables the events.
|