Module Class
A common base class for modules.
graph BT Type-->Base0["object"] Type-.->Interface0["IModule"] click Interface0 "/api/Statiq.Common/IModule" Type["Module"] class Type type-node Derived0["ParallelModule"]-->Type click Derived0 "/api/Statiq.Common/ParallelModule" Derived1["CreateTree"]-->Type click Derived1 "/api/Statiq.Core/CreateTree" Derived2["GenerateRedirects"]-->Type click Derived2 "/api/Statiq.Core/GenerateRedirects" Derived3["OrderDocuments"]-->Type click Derived3 "/api/Statiq.Core/OrderDocuments" Derived4["GroupDocuments"]-->Type click Derived4 "/api/Statiq.Core/GroupDocuments" Derived5["GenerateFeeds"]-->Type click Derived5 "/api/Statiq.Feeds/GenerateFeeds" Derived6["CountModule"]-->Type click Derived6 "/api/Statiq.Testing/CountModule" Derived7["ParallelSyncModule"]-->Type click Derived7 "/api/Statiq.Common/ParallelSyncModule" Derived8["WriteFiles"]-->Type click Derived8 "/api/Statiq.Core/WriteFiles" Derived9["MultiConfigModuleBase"]-->Type click Derived9 "/api/Statiq.Common/MultiConfigModuleBase" Derived10["ClearDocuments"]-->Type click Derived10 "/api/Statiq.Core/ClearDocuments" Derived11["FilterDocuments"]-->Type click Derived11 "/api/Statiq.Core/FilterDocuments" Derived12["ResolveXrefs"]-->Type click Derived12 "/api/Statiq.Web.Modules/ResolveXrefs" Derived13["ValidateMetadata<T>"]-->Type click Derived13 "/api/Statiq.Core/ValidateMetadata_1" Derived14["GenerateCloudSearchData"]-->Type click Derived14 "/api/Statiq.Web.Aws/GenerateCloudSearchData" Derived15["AddIndexes"]-->Type click Derived15 "/api/Statiq.Core/AddIndexes" Derived16["GenerateSitemap"]-->Type click Derived16 "/api/Statiq.Core/GenerateSitemap" Derived17["AnalyzeCSharp"]-->Type click Derived17 "/api/Statiq.CodeAnalysis/AnalyzeCSharp" Derived18["ExecutionPipeline"]-->Type click Derived18 "/api/Statiq.Core/ExecutionPipeline" Derived19["CombineDocuments"]-->Type click Derived19 "/api/Statiq.Core/CombineDocuments" Derived20["ExecuteSwitch"]-->Type click Derived20 "/api/Statiq.Core/ExecuteSwitch" Derived21["ReadWeb"]-->Type click Derived21 "/api/Statiq.Core/ReadWeb" Derived22["ExecuteIf"]-->Type click Derived22 "/api/Statiq.Core/ExecuteIf" Derived23["RenderRazor"]-->Type click Derived23 "/api/Statiq.Razor/RenderRazor" Derived24["SyncModule"]-->Type click Derived24 "/api/Statiq.Common/SyncModule" Derived25["GenerateLunrIndex"]-->Type click Derived25 "/api/Statiq.Lunr/GenerateLunrIndex" Derived26["ParallelConfigModule<TValue>"]-->Type click Derived26 "/api/Statiq.Common/ParallelConfigModule_1" Derived27["MirrorResources"]-->Type click Derived27 "/api/Statiq.Core/MirrorResources" Derived28["ReadXmp"]-->Type click Derived28 "/api/Statiq.Xmp/ReadXmp" Derived29["HighlightCode"]-->Type click Derived29 "/api/Statiq.Highlight/HighlightCode" Derived30["ExecuteBranch"]-->Type click Derived30 "/api/Statiq.Core/ExecuteBranch" Derived31["ConfigModule<TValue>"]-->Type click Derived31 "/api/Statiq.Common/ConfigModule_1" Derived32["JoinDocuments"]-->Type click Derived32 "/api/Statiq.Core/JoinDocuments" Derived33["ParentModule"]-->Type click Derived33 "/api/Statiq.Common/ParentModule" Derived34["CompileLess"]-->Type click Derived34 "/api/Statiq.Less/CompileLess"

Syntax

public abstract class Module : IModule

Remarks

Documents can either be processed one at a time by overriding ExecuteInputAsync(IDocument, IExecutionContext) or all at once by overriding ExecuteContextAsync(IExecutionContext).

Methods

Name Return Value Summary
AfterExecution(IExecutionContext, ExecutionOutputs) void
Called after each module execution.
AfterExecutionAsync(IExecutionContext, ExecutionOutputs) Task
Called after each module execution.
BeforeExecution(IExecutionContext) void
Called before each module execution.
BeforeExecutionAsync(IExecutionContext) Task
Called before each module execution.
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.
ExecuteContextAsync(IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module once for all input documents.
ExecuteInputAsync(IDocument, IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module.
Finally(IExecutionContext) void
Called after each module execution, even if an exception is thrown during execution.
FinallyAsync(IExecutionContext) Task
Called after each module execution, even if an exception is thrown during execution.

Extension Methods