NDepend.API Documentation
IsUsedByProperty Method (ExtensionMethodsCQLinqDependency)
NDepend.Reserved.CQLinq Namespace > ExtensionMethodsCQLinqDependency Class : IsUsedByProperty Method
This NDepend.CodeModel.IUsed object. A NDepend.CodeModel.IUsed object can be a NDepend.CodeModel.IAssembly, NDepend.CodeModel.INamespace, NDepend.CodeModel.IMember, NDepend.CodeModel.IType, NDepend.CodeModel.IProperty or NDepend.CodeModel.IField object.
The NDepend.CodeModel.ICodeElement.FullName of the property user.
The string userPropertyFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several properties are matched by userPropertyFullName, this property has a used by any behavior.
Returns true if this usedCodeElement is directly used by a NDepend.CodeModel.IProperty whose NDepend.CodeModel.ICodeElement.FullName is userPropertyFullName. This property can only be called in a ICQLinqExecutionContext, otherwise the property NDepend.CodeModel.IUsed.NDepend.CodeModel.IUsed.IsUsedByProperty must be called instead.
Syntax
[Extension()]
public static bool IsUsedByProperty( 
   IUsed usedCodeElement,
   string userPropertyFullName
)

Parameters

usedCodeElement
This NDepend.CodeModel.IUsed object. A NDepend.CodeModel.IUsed object can be a NDepend.CodeModel.IAssembly, NDepend.CodeModel.INamespace, NDepend.CodeModel.IMember, NDepend.CodeModel.IType, NDepend.CodeModel.IProperty or NDepend.CodeModel.IField object.
userPropertyFullName
The NDepend.CodeModel.ICodeElement.FullName of the property user.
The string userPropertyFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several properties are matched by userPropertyFullName, this property has a used by any behavior.
Exceptions
ExceptionDescription
This extension property cannot be called from a program consuming NDepend.API. In such context, the property NDepend.CodeModel.IUsed.NDepend.CodeModel.IUsed.IsUsedByProperty must be called instead.
Remarks
If one or several properties are matched by userPropertyFullName, they will be listed in NDepend.CodeQuery.IQueryExecutionSuccessResult.TargetCodeElements.
In the context of a CQLinq compiled query, this property 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