Sidecar Class

Summary

Extracts the content of a Sidecar file for each document and sends it to a child module for processing.
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Modules.Control
Interfaces
Base Types
graph BT Type-->Base0["ContainerModule"] click Base0 "/api/Wyam.Common.Modules/ContainerModule" Base0-->Base1["Object"] Type-.->Interface0["IModule"] click Interface0 "/api/Wyam.Common.Modules/IModule" Type-.->Interface1["IModuleList"] click Interface1 "/api/Wyam.Common.Modules/IModuleList" Type-.->Interface2["IList<IModule>"] Type["Sidecar"] class Type type-node

Syntax

public class Sidecar : ContainerModule, IModule, IModuleList, IList<IModule>

Remarks

This module is typically used in conjunction with the Yaml module to enable putting YAML in a Sidecar file. First, an attempt is made to find the specified sidecar file for each input document. Once found, the content in this file is passed to the specified child module(s). Any metadata from the child module output document(s) is added to the input document. Note that if the child module(s) result in more than one output document, multiple clones of the input document will be made for each one. The output document content is set to the original input document content.

Constructors

Name Summary
Sidecar(DocumentConfig, IEnumerable<IModule>) Uses a delegate to describe where to find the sidecar file for each input document. If a sidecar file is found, it's content is passed to the specified child modules for processing.
Sidecar(DocumentConfig, IModule[]) Uses a delegate to describe where to find the sidecar file for each input document. If a sidecar file is found, it's content is passed to the specified child modules for processing.
Sidecar(IEnumerable<IModule>) Searches for sidecar files at the same path as the input document SourceFilePath with the additional extension .meta. If a sidecar file is found, it's content is passed to the specified child modules for processing.
Sidecar(IModule[]) Searches for sidecar files at the same path as the input document SourceFilePath with the additional extension .meta. If a sidecar file is found, it's content is passed to the specified child modules for processing.
Sidecar(string, IEnumerable<IModule>) Searches for sidecar files at the same path as the input document SourceFilePath with the specified additional extension. If a sidecar file is found, it's content is passed to the specified child modules for processing.
Sidecar(string, IModule[]) Searches for sidecar files at the same path as the input document SourceFilePath with the specified additional extension. If a sidecar file is found, it's content is passed to the specified child modules for processing.

Properties

Name Value Summary
Count int
Inherited from ContainerModule
IsReadOnly bool
Inherited from ContainerModule
this[int] IModule
Inherited from ContainerModule
this[string] IModule
Gets the module with the specified name.
Inherited from ContainerModule

Methods

Name Value Summary
Add(IModule) void
Inherited from ContainerModule
Add(IModule[]) void
Adds modules to the list. Any null items in the sequence of modules will be discarded.
Inherited from ContainerModule
Add(string, IModule) void
Adds a module to the list with a specified name.
Inherited from ContainerModule
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.
Inherited from ContainerModule
Clear() void
Inherited from ContainerModule
Contains(IModule) bool
Inherited from ContainerModule
Contains(string) bool
Determines if the list contains a module with the specified name.
Inherited from ContainerModule
CopyTo(IModule[], int) void
Inherited from ContainerModule
Execute(IReadOnlyList<IDocument>, IExecutionContext) IEnumerable<IDocument>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
GetEnumerator() IEnumerator<IModule>
Inherited from ContainerModule
IndexOf(IModule) int
Inherited from ContainerModule
IndexOf(string) int
Gets the index of the module with the specified name.
Inherited from ContainerModule
Insert(int, IModule) void
Inherited from ContainerModule
Insert(int, IModule[]) void
Inserts modules into the list. Any null items in the sequence of modules will be discarded.
Inherited from ContainerModule
Insert(int, string, IModule) void
Inserts a module into the list with a specified name.
Inherited from ContainerModule
Remove(IModule) bool
Inherited from ContainerModule
Remove(string) bool
Removes a module by name.
Inherited from ContainerModule
RemoveAt(int) void
Inherited from ContainerModule
TryGetValue(string, IModule) bool
Attempts to get a module with the specified name.
Inherited from ContainerModule
GitHub