Clones each input document with the content and metadata from each result document.
- Namespace
- Statiq
.Core - Interfaces
- Base Types
graph BT
Type-->Base0["SyncChildDocumentsModule"]
click Base0 "/api/Statiq.Common/SyncChildDocumentsModule"
Base0-->Base1["ChildDocumentsModule"]
click Base1 "/api/Statiq.Common/ChildDocumentsModule"
Base1-->Base2["ParentModule"]
click Base2 "/api/Statiq.Common/ParentModule"
Base2-->Base3["Module"]
click Base3 "/api/Statiq.Common/Module"
Base3-->Base4["object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Statiq.Common/IModule"
Type-.->Interface1["IEnumerable<IModule>"]
Type-.->Interface2["IEnumerable"]
Type["MergeDocuments"]
class Type type-node
Syntax
public class MergeDocuments : SyncChildDocumentsModule, IModule, IEnumerable<IModule>, IEnumerable
Remarks
If more than one result document is produced, it will be merged with every input document and the
total number of output documents will be input * result. If you want to maintain a 1-to-1 relationship
between input documents and child module results, wrap with a
ForEachDocument
module
or use the ForEachDocument(IModule)
extension.
Constructors
Name | Summary |
---|---|
MergeDocuments |
|
MergeDocuments |
|
MergeDocuments |
|
MergeDocuments |
Properties
Name | Property Type | Summary |
---|---|---|
Children | ModuleList |
The children of this module.
Inherited from ParentModule
|
Methods
Name | Return Value | Summary |
---|---|---|
Add |
void |
Adds modules as a child of this module.
Inherited from ParentModule
|
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
|
ExecuteChildren |
IEnumerable |
|
ExecuteChildrenAsync |
Task |
Gets the output documents given the input documents and the output documents from the execution of child modules.
Inherited from Sync
|
ExecuteContextAsync |
Task |
Executes the module once for all input documents.
Inherited from ChildDocumentsModule
|
ExecuteInputAsync |
Task |
Executes the module.
Inherited from ChildDocumentsModule
|
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
|
GetEnumerator |
IEnumerator |
Inherited from ParentModule
|
KeepExistingMetadata |
MergeDocuments |
The default behavior of this module is to replace all existing metadata with metadata from
the merged document. This method ensures that any existing metadata values are kept and only
non-existing values are merged.
|
Reverse |
MergeDocuments |
The default behavior of this module is to clone each input document with the content and metadata
from each result document. This method reverses that logic by cloning each result document with the
content and metadata from each input document.
|