NDepend.API Documentation
IndirectlyAssignField Method
NDepend.Reserved.CQLinq Namespace > ExtensionMethodsCQLinqDependency Class : IndirectlyAssignField Method
This method.
The NDepend.CodeModel.ICodeElement.FullName of the assigned field.
The string assignedFieldFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several fields are matched by assignedFieldFullName, this method has a assigning any behavior.
Returns true if method is assigning, directly or indirectly, a field whose NDepend.CodeModel.ICodeElement.FullName is assignedFieldFullName. This method can only be called in a ICQLinqExecutionContext, otherwise the extension method NDepend.CodeModel.ExtensionMethodsSequenceUsage.NDepend.CodeModel.ExtensionMethodsSequenceUsage.ThatIndirectlyAssignAnyFields must be used instead.
Syntax
[Extension()]
public static bool IndirectlyAssignField( 
   IMethod method,
   string assignedFieldFullName
)

Parameters

method
This method.
assignedFieldFullName
The NDepend.CodeModel.ICodeElement.FullName of the assigned field.
The string assignedFieldFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several fields are matched by assignedFieldFullName, this method has a assigning any behavior.

Return Value

assignedField being a NDepend.CodeModel.IField whose NDepend.CodeModel.ICodeElement.FullName is assignedFieldFullName:
Returns true if method assigns, directly or indirectly, a assignedField, otherwise returns false.
Exceptions
ExceptionDescription
This extension method cannot be called from a program consuming NDepend.API. In such context, the extension method NDepend.CodeModel.ExtensionMethodsSequenceUsage.NDepend.CodeModel.ExtensionMethodsSequenceUsage.ThatIndirectlyAssignAnyFields must be used instead.
Remarks
If one or several fields are matched by assignedFieldFullName, they will be listed in NDepend.CodeQuery.IQueryExecutionSuccessResult.TargetCodeElements.
In the context of a CQLinq compiled query, this method has a constant 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

ExtensionMethodsCQLinqDependency Class
ExtensionMethodsCQLinqDependency Members
NDepend.Reserved.CQLinq.ExtensionMethodsCQLinqDependency.AssignField(NDepend.CodeModel.IMethod,System.String)
DepthOfAssignField Method