Clones a new document for each item in a given metadata value.
- Namespace
- Statiq
.Core - Interfaces
- Base Types
-
- object
- Module
- ParallelConfigModule
<IEnumerable <object> >
graph BT
Type-->Base0["ParallelConfigModule<IEnumerable<object>>"]
Base0-->Base1["Module"]
click Base1 "/api/Statiq.Common/Module"
Base1-->Base2["object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Statiq.Common/IModule"
Type-.->Interface1["IParallelModule"]
click Interface1 "/api/Statiq.Common/IParallelModule"
Type["EnumerateValues"]
class Type type-node
Syntax
public class EnumerateValues : ParallelConfigModule<IEnumerable<object>>, IModule, IParallelModule
Remarks
Enumerates values returned by a config and clones a document for each one.
The current value for each cloned document is contained in
Current
.
Generally speaking you shouldn't enumerate documents since they get cloned as
a pipeline progresses. Instead you should enumerate some identifier and operate on that
to find the correct documents when the template gets rendered.
Constructors
Name | Summary |
---|---|
EnumerateValues |
Enumerates the values stored in the Enumerate metadata key.
|
EnumerateValues |
Enumerates the values returned by the config and clones a document for each one. If the config returns null for a given document, the original input document will be output. If the config returns an empty enumerable for a given document, no result documents will be output for that input document. |
EnumerateValues |
Enumerates the values stored in the given metadata key. |
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
|
ExecuteConfigAsync |
Task |
|
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
|
WithCurrentKey |
EnumerateValues |
Sets the metadata key to use for storing the current enumerated value in cloned documents.
This is
Current by default.
|
WithInputDocument |
EnumerateValues |
If the configuration delegate returns
true the original input document will be
included as the first result. By default, EnumerateWithInput is used.
|