Filters the current sequence of documents using a predicate.
- Namespace
- Statiq
.Core - Interfaces
- Base Types
-
- object
- Module
Syntax
public class FilterDocuments : Module, IModule
Remarks
This module filters documents using "or" logic. If you want to also apply
"and" conditions, place additional
FilterDocuments modules
after this one.
Constructors
| Name | Summary |
|---|---|
| FilterDocuments |
Creates a module to filter documents but applies no default filtering. |
| FilterDocuments |
Specifies the predicate to use for filtering documents.
Only input documents for which the predicate returns true will be output.
|
| FilterDocuments |
Specifies a metadata key that must be present. Only input documents for which the key exists will be output. |
Methods
| Name | Return Value | Summary |
|---|---|---|
| AfterExecution |
void |
Called after each module execution.
Inherited from Module
|
| AfterExecutionAsync |
Task |
Called after each module execution.
Inherited from Module
|
| BeforeExecution |
void |
Called before each module execution.
Inherited from Module
|
| BeforeExecutionAsync |
Task |
Called before each module execution.
Inherited from Module
|
| ExecuteAsync |
Task |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
|
| ExecuteContextAsync |
Task |
Executes the module once for all input documents.
|
| ExecuteInputAsync |
Task |
Executes the module.
Inherited from Module
|
| Finally |
void |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
| FinallyAsync |
Task |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
| Or |
FilterDocuments |
Applies an additional predicate to the filtering operation as an "or" condition.
|
| Or |
FilterDocuments |
Checks for the presence of an additional key in the filtering operation as an "or" condition.
|