Pipeline Class

Summary

A utility class for specifying pipelines. Note that this is not required for pipeline creation and is typically only used when a pipeline needs to be specified outside the context of a configuration file (such as a recipe, though it's not even required for those). Instances of this class are typically assigned to read-only properties in a Wyam.Common.Configuration.Recipe class and by convention the class name should match the property name (an exception will be thrown during recipe application if not). This class also implements string conversions and operators that return the pipeline name (so it can be used as a key for the pipeline it defines). Note that once this pipeline is added to an Wyam.Common.Execution.IPipelineCollection, the actual instance probably won't be what's stored by the collection and should not be used for comparisons.
graph BT Type-->Base0["Object"] Type-.->Interface0["IPipeline"] click Interface0 "/api/Wyam.Common.Execution/IPipeline" Type-.->Interface1["IModuleList"] click Interface1 "/api/Wyam.Common.Modules/IModuleList" Type-.->Interface2["IList<IModule>"] Type["Pipeline"] class Type type-node Derived0["Api"]-->Type click Derived0 "/api/Wyam.Docs.Pipelines/Api" Derived1["Sass"]-->Type click Derived1 "/api/Wyam.Web.Pipelines/Sass" Derived2["Sitemap"]-->Type click Derived2 "/api/Wyam.Web.Pipelines/Sitemap" Derived3["Pages"]-->Type click Derived3 "/api/Wyam.Web.Pipelines/Pages" Derived4["BlogPosts"]-->Type click Derived4 "/api/Wyam.Web.Pipelines/BlogPosts" Derived5["Archive"]-->Type click Derived5 "/api/Wyam.Web.Pipelines/Archive" Derived6["ConditionalPipeline"]-->Type click Derived6 "/api/Wyam.Web.Pipelines/ConditionalPipeline" Derived7["RenderBlogPosts"]-->Type click Derived7 "/api/Wyam.Web.Pipelines/RenderBlogPosts" Derived8["Less"]-->Type click Derived8 "/api/Wyam.Web.Pipelines/Less" Derived9["RenderApi"]-->Type click Derived9 "/api/Wyam.Docs.Pipelines/RenderApi" Derived10["ValidateLinks"]-->Type click Derived10 "/api/Wyam.Web.Pipelines/ValidateLinks" Derived11["RenderPages"]-->Type click Derived11 "/api/Wyam.Web.Pipelines/RenderPages" Derived12["Redirects"]-->Type click Derived12 "/api/Wyam.Web.Pipelines/Redirects" Derived13["Feeds"]-->Type click Derived13 "/api/Wyam.Web.Pipelines/Feeds" Derived14["ApiSearchIndex"]-->Type click Derived14 "/api/Wyam.Docs.Pipelines/ApiSearchIndex" Derived15["TagIndex"]-->Type click Derived15 "/api/Wyam.Blog.Pipelines/TagIndex" Derived16["Resources"]-->Type click Derived16 "/api/Wyam.Web.Pipelines/Resources" Derived17["ApiIndex"]-->Type click Derived17 "/api/Wyam.Docs.Pipelines/ApiIndex" Derived18["Code"]-->Type click Derived18 "/api/Wyam.Docs.Pipelines/Code"

Syntax

public class Pipeline : IPipeline, IModuleList, IList<IModule>

Constructors

Name Summary
Pipeline() Creates a pipeline with an empty modules collection and a default name equal to the class name.
Pipeline(IEnumerable<IModule>) Creates a pipeline with the specified modules and a default name equal to the class name.
Pipeline(IModule[]) Creates a pipeline with the specified modules and a default name equal to the class name.
Pipeline(string, IEnumerable<IModule>) Creates a pipeline with the specified modules and the specified name.
Pipeline(string, IModule[]) Creates a pipeline with the specified modules and the specified name.

Properties

Name Value Summary
Count int
IsReadOnly bool
Name string
The name of the pipeline.
ProcessDocumentsOnce bool
Specifies that a given pipeline doesn't use data from other pipelines and prevents reprocessing of documents after the first pass.
this[int] IModule
this[string] IModule
Gets the module with the specified name.

Methods

Name Value Summary
Add(IModule) void
Add(IModule[]) void
Adds modules to the list. Any null items in the sequence of modules will be discarded.
Add(string, IModule) void
Adds a module to the list with a specified name.
AsKeyValuePairs() IEnumerable<KeyValuePair<string, IModule>>
Returns the list as a sequence of key-value pairs with the keys being the module names and the values being the module instances.
Clear() void
Contains(IModule) bool
Contains(string) bool
Determines if the list contains a module with the specified name.
CopyTo(IModule[], int) void
GetEnumerator() IEnumerator<IModule>
GetHashCode() int
IndexOf(IModule) int
IndexOf(string) int
Gets the index of the module with the specified name.
Insert(int, IModule) void
Insert(int, IModule[]) void
Inserts modules into the list. Any null items in the sequence of modules will be discarded.
Insert(int, string, IModule) void
Inserts a module into the list with a specified name.
Remove(IModule) bool
Remove(string) bool
Removes a module by name.
RemoveAt(int) void
ToString() string
TryGetValue(string, IModule) bool
Attempts to get a module with the specified name.

Operators

Name Value Summary
implicit operator string(Pipeline) string
GitHub