Click or drag to resize
FilterHelperFilterT Method
Returns an optionally sorted collection of items filtered from the items in originalItems.

Namespace: Lawo.ComponentModel
Assembly: Lawo (in Lawo.dll) Version: 1.4.1707.27006
Syntax
C#
public static DisposableReadOnlyObservableCollection<T> Filter<T>(
	this ReadOnlyObservableCollection<T> originalItems,
	Predicate<T> predicate,
	IComparer<T> comparer
)

Parameters

originalItems
Type: System.Collections.ObjectModelReadOnlyObservableCollectionT
The collection of original items to filter.
predicate
Type: SystemPredicateT
Represents the method that determines whether a given item should appear in the returned collection.
comparer
Type: System.Collections.GenericIComparerT
The IComparerT implementation to use to sort items; or, null to not sort the items.

Type Parameters

T
The type of the items in originalItems.

Return Value

Type: DisposableReadOnlyObservableCollectionT

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ReadOnlyObservableCollectionT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionoriginalItems and/or predicate equal null.
Remarks

All operations on originalItems are automatically matched by an equivalent operation on the returned collection such that an item in the original collection for which predicate returns true will also appear in the returned collection.

See Also