ModuleListExtensions.

ReplaceLast<TModule>(IModuleList, Predicate<TModule>, IModule, string) Method

Summary

Replaces the last module in the list of the specified type that satisfies a predicate.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Modules
Containing Type
ModuleListExtensions

Syntax

public static IModuleList ReplaceLast<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

Type Description
IModuleList The current instance.
GitHub