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 TD Base0["Object"]-->Type Interface0["IPipeline"]-.->Type click Interface0 "/api/Wyam.Common.Execution/IPipeline" Interface1["IModuleList"]-.->Type click Interface1 "/api/Wyam.Common.Modules/IModuleList" Interface2["IList<IModule>"]-.->Type Type["Pipeline"] class Type type-node Type-->Derived0["Archive"] click Derived0 "/api/Wyam.Web.Pipelines/Archive" Type-->Derived1["RenderPages"] click Derived1 "/api/Wyam.Web.Pipelines/RenderPages" Type-->Derived2["Sass"] click Derived2 "/api/Wyam.Web.Pipelines/Sass" Type-->Derived3["Code"] click Derived3 "/api/Wyam.Docs.Pipelines/Code" Type-->Derived4["Redirects"] click Derived4 "/api/Wyam.Web.Pipelines/Redirects" Type-->Derived5["Resources"] click Derived5 "/api/Wyam.Web.Pipelines/Resources" Type-->Derived6["ApiIndex"] click Derived6 "/api/Wyam.Docs.Pipelines/ApiIndex" Type-->Derived7["Api"] click Derived7 "/api/Wyam.Docs.Pipelines/Api" Type-->Derived8["Feeds"] click Derived8 "/api/Wyam.Web.Pipelines/Feeds" Type-->Derived9["TagIndex"] click Derived9 "/api/Wyam.Blog.Pipelines/TagIndex" Type-->Derived10["RenderApi"] click Derived10 "/api/Wyam.Docs.Pipelines/RenderApi" Type-->Derived11["Less"] click Derived11 "/api/Wyam.Web.Pipelines/Less" Type-->Derived12["BlogPosts"] click Derived12 "/api/Wyam.Web.Pipelines/BlogPosts" Type-->Derived13["ValidateLinks"] click Derived13 "/api/Wyam.Web.Pipelines/ValidateLinks" Type-->Derived14["RenderBlogPosts"] click Derived14 "/api/Wyam.Web.Pipelines/RenderBlogPosts" Type-->Derived15["ApiSearchIndex"] click Derived15 "/api/Wyam.Docs.Pipelines/ApiSearchIndex" Type-->Derived16["Sitemap"] click Derived16 "/api/Wyam.Web.Pipelines/Sitemap" Type-->Derived17["Pages"] click Derived17 "/api/Wyam.Web.Pipelines/Pages" Type-->Derived18["ConditionalPipeline"] click Derived18 "/api/Wyam.Web.Pipelines/ConditionalPipeline"

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