FlattenTree Class
Flattens a tree structure.
Namespace
Statiq.Core
Interfaces
Base Types
graph BT Type-->Base0["SyncModule"] click Base0 "/api/Statiq.Common/SyncModule" Base0-->Base1["Module"] click Base1 "/api/Statiq.Common/Module" Base1-->Base2["object"] Type-.->Interface0["IModule"] click Interface0 "/api/Statiq.Common/IModule" Type["FlattenTree"] class Type type-node

Syntax

public class FlattenTree : SyncModule, IModule

Remarks

This module will either get all descendants of all input documents from a given metadata key (Children by default) or all descendants from all metadata if a null key is specified. The output also includes the initial input documents in both cases. The documents will be returned in no particular order and only distinct documents will be returned (I.e., if a document exists as a child of more than one parent, it will only appear once in the result set).

Constructors

Name Summary
FlattenTree() Creates a new flatten module that uses the Children key to find child documents and does not remove tree placeholder documents.
FlattenTree(bool, string) Creates a new flatten module with the specified key for child documents. Specify null to flatten all descendant documents regardless of key.
FlattenTree(bool) Creates a new flatten module with the specified key for child documents. Specify null to flatten all descendant documents regardless of key.
FlattenTree(string, string) Creates a new flatten module with the specified key for child documents. Specify null to flatten all descendant documents regardless of key.
FlattenTree(string) Creates a new flatten module with the specified key for child documents and does not remove tree placeholder documents. Specify null to flatten all descendant documents regardless of key.

Methods

Name Return Value Summary
AfterExecution(IExecutionContext, ExecutionOutputs) void
Called after each module execution.
Inherited from Module
AfterExecutionAsync(IExecutionContext, ExecutionOutputs) Task
Called after each module execution.
Inherited from Module
BeforeExecution(IExecutionContext) void
Called before each module execution.
Inherited from Module
BeforeExecutionAsync(IExecutionContext) Task
Called before each module execution.
Inherited from Module
ExecuteAsync(IExecutionContext) Task<IEnumerable<IDocument>>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
ExecuteContext(IExecutionContext) IEnumerable<IDocument>
ExecuteContextAsync(IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module once for all input documents.
Inherited from SyncModule
ExecuteInput(IDocument, IExecutionContext) IEnumerable<IDocument>
Executes the module.
Inherited from SyncModule
ExecuteInputAsync(IDocument, IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module.
Inherited from SyncModule
Finally(IExecutionContext) void
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
FinallyAsync(IExecutionContext) Task
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module

Extension Methods