Filters the documents by destination.
Syntax
public static FilteredDocumentList<TDocument> FilterDestinations<TDocument>(this IEnumerable<TDocument> documents, IEnumerable<string> patterns, bool flatten = true, string childrenKey = "Children")
where TDocument : IDocument
This module filters documents using "or" logic. If you want to also apply
"and" conditions, chain additional calls.
Type Parameters
Name |
Description |
TDocument |
The document type. |
Parameters
Name |
Type |
Description |
documents |
IEnumerable<TDocument> |
The documents to filter. |
patterns |
IEnumerable<string> |
The globbing pattern(s) to match. |
flatten |
bool |
true to flatten the documents, false otherwise.
If false only the top-level sequence (usually the parent-most documents) will be filtered.
|
childrenKey |
string |
The metadata key that contains the children or null to flatten documents in all metadata keys.
This parameter has no effect if flatten is false .
|
Return Value