ModuleListExtensions.

Replace<TModuleList>(TModuleList, int, IModule, string) Method

Summary

Replaces a module at the specified index.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Modules
Containing Type
ModuleListExtensions

Syntax

public static TModuleList Replace<TModuleList>(this TModuleList moduleList, int index, IModule module, string name = null) 
    where TModuleList : IModuleList

Type Parameters

Name Description
TModuleList The type of the module list.

Parameters

Name Type Description
moduleList TModuleList The Wyam.Common.Modules.ModuleList.
index int The index of the module to replace.
module IModule The replacement module.
name string An optional name of the replacement module.

Return Value

Type Description
TModuleList The current instance.
GitHub