ExecuteConfig Class
Gets documents from an arbitrary config value.
Namespace
Statiq.Core
Interfaces
Base Types
graph BT Type-->Base0["ParallelConfigModule<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["ExecuteConfig"] class Type type-node

Syntax

public class ExecuteConfig : ParallelConfigModule<object>, IModule, IParallelModule

Remarks

This module is very useful for customizing pipeline execution without having to write an entire module. Returning modules from the config value is also useful for customizing existing modules based on the current set of documents.

If the value is null this module will output the original input document(s). If the value is a IDocument, IEnumerable<T>, or IAsyncEnumerable<T>, the document(s) will be the output(s) of this module. If the value is a IEnumerable<T> or IModule, the module(s) will be executed with the input document(s) as their input and the results will be the output(s) of this module. If the value is an IContentProvider, IContentProviderFactory, or Stream it will be used to get new content for the provided document (or create a new document if the provided document is null). If config value is anything else, the content of the input document will be changed to (or a new document created with) the string value.

If the provided config value does not require a document (for example, it's created with the FromSetting(string, object) factory method) then it will be invoked once for all input documents. If the provided config value does require a document (for example, it's created with the FromDocument(string, object) factory method) then if will be invoked once for each input document.

Constructors

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
ExecuteConfigAsync(IDocument, IExecutionContext, object) Task<IEnumerable<IDocument>>
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