NDepend.API Documentation
DepthOfAssignAnyFields Method
NDepend.CodeModel Namespace > ExtensionMethodsSequenceUsage Class : DepthOfAssignAnyFields Method
This sequence of methods.
The sequence of fields assigned by methods in the returned sequence.
Returns a ICodeMetric<TCodeElement,TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence methods, containing only methods that directly or indirectly assign any field in fieldsAssigned. The metric value for each method in DefinitionDomain is equal to the smallest depth of usage of any field assigned.
Syntax

Parameters

methods
This sequence of methods.
fieldsAssigned
The sequence of fields assigned by methods in the returned sequence.
Remarks
The depth value for methods in returned code metric DefinitionDomain, that are directly assigning any field in fieldsAssigned, is 0.
The depth value for methods in returned code metric DefinitionDomain, that are directly calling a method that assigns any field in fieldsAssigned, is 1.
And so forth.
This extension method has a O(methods.Count + fieldsAssigned.Count) time complexity.
Requirements

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

See Also

Reference

ExtensionMethodsSequenceUsage Class
ExtensionMethodsSequenceUsage Members
FieldsUsed Property
FieldsAssigned Property
FieldsReadButNotAssigned Property
MethodsUsingMe Property
MethodsAssigningMe Property
MethodsReadingMeButNotAssigningMe Property
ThatAssignField Method
ThatAssignAnyFields Method
ThatIndirectlyAssignAnyFields Method
DepthOfAssignField Method
NDepend.Reserved.CQLinq.ExtensionMethodsCQLinqDependency.AssignField(NDepend.CodeModel.IMethod,System.String)
IndirectlyAssignField Method
DepthOfAssignField Method