ModuleListExtensions.

IndexOfFirst<TModule>(IModuleList, Predicate<TModule>) Method

Summary

Gets the index of the first module of the specified type.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Modules
Containing Type
ModuleListExtensions

Syntax

public static int IndexOfFirst<TModule>(this IModuleList moduleList, Predicate<TModule> filter) 
    where TModule : class, IModule

Type Parameters

Name Description
TModule The type of the module to find.

Parameters

Name Type Description
moduleList IModuleList The Wyam.Common.Modules.ModuleList to search.
filter Predicate<TModule> A predicate determining which module to find.

Return Value

Type Description
int The index of the first module of the specified type or -1 if a module of the specified type could not be found.
GitHub