NDepend.API Documentation
FillIterative<TCodeElement> Method
NDepend.CodeModel Namespace > ExtensionMethodsHelpers Class : FillIterative<TCodeElement> Method
The code element type that is ICodeElement or that implements ICodeElement.
The initial sequence of code elements consumed by the first iteration.
The function used to compute new elements of the iteration N+1 from new elements computed at iteration N.
Iteratively fills a sequence of code elements, until no new element can be added. The first iteration starts with initialSeq, and the function func is used to compute new elements of the iteration N+1 from new elements computed at iteration N.
Syntax

Parameters

initialSeq
The initial sequence of code elements consumed by the first iteration.
func
The function used to compute new elements of the iteration N+1 from new elements computed at iteration N.

Type Parameters

TCodeElement
The code element type that is ICodeElement or that implements ICodeElement.

Return Value

A new ICodeMetric<TCodeElement,TNumeric> object. The code metric value for each element in DefinitionDomain is the iteration number when it was added. Value for code elements in initialSeq is 0.
Exceptions
ExceptionDescription
The number of iterations has outreached the maximum iterations threshold, which is fixed to 100.
initialSeq or a sequence returned by a call to func contains a null TCodeElement.
Remarks
This method differs from FillIncremental<TCodeElement> because only elements computed at iteration N are used to compute elements of iteration N+1.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsHelpers Class
ExtensionMethodsHelpers Members