Summary
Replaces the first module in the list of the specified type that satisfies a predicate.
Syntax
public static IModuleList ReplaceFirst<TModule>(this IModuleList moduleList, Predicate<TModule> filter, IModule module, string name = null)
where TModule : class, IModule
Type Parameters
Name |
Description |
TModule |
The type of the module to replace. |
Parameters
Name |
Type |
Description |
moduleList |
IModuleList |
The Wyam.Common.Modules.ModuleList . |
filter |
Predicate<TModule> |
A predicate determining which module to replace. |
module |
IModule |
The replacement module. |
name |
string |
The name of the replacement module. |
Return Value