Summary
Executes child modules enabling better reuse.
- Assembly
- Wyam
.Core .dll - Namespace
- Wyam
.Core .Modules .Extensibility - Interfaces
-
- IModule
- IModuleList
- IList
<IModule>
- Base Types
-
- Object
- ContainerModule
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["ModuleCollection"]
class Type type-node
Syntax
public class ModuleCollection : ContainerModule, IModule, IModuleList, IList<IModule>
Examples
ModuleCollection common = ModuleCollection(ModuleA(), ModuleB(), ModuleC());
Piplines.Add("A",
ModuleX(),
ModuleY(),
common,
ModuleZ()
);
Piplines.Add("B",
ModuleX(),
common,
ModuleZ()
);
Remarks
All child modules will be executed as if they were inline. This enables you to specify
a sequence of modules outside of a pipeline and then reuse that sequence of modules
in multiple pipelines. Note that this module is also handy for wrapping a single module
that has a complex configuration if you expect to use it in multiple places.
Constructors
| Name | Summary |
|---|---|
| ModuleCollection |
Creates a module collection with the specified child modules.
Any null items in the sequence of modules will be discarded.
|
| ModuleCollection |
Creates a module collection with the specified child modules.
Any null items in the sequence of modules will be discarded.
|
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 |
void |
Inherited from ContainerModule
|
| Add |
void |
Adds modules to the list.
Any
null items in the sequence of modules will be discarded.
Inherited from ContainerModule
|
| Add |
void |
Adds a module to the list with a specified name.
Inherited from ContainerModule
|
| AsKeyValuePairs |
IEnumerable |
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 |
bool |
Inherited from ContainerModule
|
| Contains |
bool |
Determines if the list contains a module with the specified name.
Inherited from ContainerModule
|
| CopyTo |
void |
Inherited from ContainerModule
|
| Execute |
IEnumerable |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
|
| GetEnumerator |
IEnumerator |
Inherited from ContainerModule
|
| IndexOf |
int |
Inherited from ContainerModule
|
| IndexOf |
int |
Gets the index of the module with the specified name.
Inherited from ContainerModule
|
| Insert |
void |
Inherited from ContainerModule
|
| Insert |
void |
Inserts modules into the list.
Any
null items in the sequence of modules will be discarded.
Inherited from ContainerModule
|
| Insert |
void |
Inserts a module into the list with a specified name.
Inherited from ContainerModule
|
| Remove |
bool |
Inherited from ContainerModule
|
| Remove |
bool |
Removes a module by name.
Inherited from ContainerModule
|
| RemoveAt |
void |
Inherited from ContainerModule
|
| TryGetValue |
bool |
Attempts to get a module with the specified name.
Inherited from ContainerModule
|
