Collection<T>.Filter Method
Creates a wrapper collection that filters out all the elements that do not match the conditions defined by the specified predicate.
Namespace: Microsoft.SqlServer.Management.SqlParser.MetadataProvider
Assembly: Microsoft.SqlServer.Management.SqlParser (in Microsoft.SqlServer.Management.SqlParser.dll)
Syntax
'Declaration
Public Shared Function Filter ( _
collection As IMetadataCollection(Of T), _
match As Predicate(Of T) _
) As IMetadataCollection(Of T)
'Usage
Dim collection As IMetadataCollection(Of T)
Dim match As Predicate(Of T)
Dim returnValue As IMetadataCollection(Of T)
returnValue = Collection.Filter(collection, _
match)
public static IMetadataCollection<T> Filter(
IMetadataCollection<T> collection,
Predicate<T> match
)
public:
static IMetadataCollection<T>^ Filter(
IMetadataCollection<T>^ collection,
Predicate<T>^ match
)
static member Filter :
collection:IMetadataCollection<'T> *
match:Predicate<'T> -> IMetadataCollection<'T>
public static function Filter(
collection : IMetadataCollection<T>,
match : Predicate<T>
) : IMetadataCollection<T>
Parameters
- collection
Type: Microsoft.SqlServer.Management.SqlParser.Metadata.IMetadataCollection<T>
The original collection.
- match
Type: System.Predicate<T>
The Predicate delegate that defines the conditions of the elements to include in the new collection.
Return Value
Type: Microsoft.SqlServer.Management.SqlParser.Metadata.IMetadataCollection<T>
A wrapper collection that includes only the elements that match the conditions defined in the predicate.