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["Less"]-->Type click Derived0 "/api/Wyam.Web.Pipelines/Less" Derived1["ApiSearchIndex"]-->Type click Derived1 "/api/Wyam.Docs.Pipelines/ApiSearchIndex" Derived2["Archive"]-->Type click Derived2 "/api/Wyam.Web.Pipelines/Archive" Derived3["RenderPages"]-->Type click Derived3 "/api/Wyam.Web.Pipelines/RenderPages" Derived4["Redirects"]-->Type click Derived4 "/api/Wyam.Web.Pipelines/Redirects" Derived5["BlogPosts"]-->Type click Derived5 "/api/Wyam.Web.Pipelines/BlogPosts" Derived6["ApiIndex"]-->Type click Derived6 "/api/Wyam.Docs.Pipelines/ApiIndex" Derived7["RenderApi"]-->Type click Derived7 "/api/Wyam.Docs.Pipelines/RenderApi" Derived8["RenderBlogPosts"]-->Type click Derived8 "/api/Wyam.Web.Pipelines/RenderBlogPosts" Derived9["Sass"]-->Type click Derived9 "/api/Wyam.Web.Pipelines/Sass" Derived10["Api"]-->Type click Derived10 "/api/Wyam.Docs.Pipelines/Api" Derived11["Resources"]-->Type click Derived11 "/api/Wyam.Web.Pipelines/Resources" Derived12["Sitemap"]-->Type click Derived12 "/api/Wyam.Web.Pipelines/Sitemap" Derived13["ValidateLinks"]-->Type click Derived13 "/api/Wyam.Web.Pipelines/ValidateLinks" Derived14["ConditionalPipeline"]-->Type click Derived14 "/api/Wyam.Web.Pipelines/ConditionalPipeline" Derived15["TagIndex"]-->Type click Derived15 "/api/Wyam.Blog.Pipelines/TagIndex" Derived16["Code"]-->Type click Derived16 "/api/Wyam.Docs.Pipelines/Code" Derived17["Feeds"]-->Type click Derived17 "/api/Wyam.Web.Pipelines/Feeds" Derived18["Pages"]-->Type click Derived18 "/api/Wyam.Web.Pipelines/Pages"

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