[Extension()] public static bool IsIndirectlyUsing( IUser userCodeElement, string usedCodeElementFullName )
Parameters
- userCodeElement
- This NDepend.CodeModel.IUser object. A NDepend.CodeModel.IUser object can be a NDepend.CodeModel.IAssembly, NDepend.CodeModel.INamespace, NDepend.CodeModel.IType or NDepend.CodeModel.IMethod object.
- usedCodeElementFullName
- The NDepend.CodeModel.ICodeElement.FullName of the code element used.
The string usedCodeElementFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several code elements are matched by usedCodeElementFullName, this method has a using any behavior.
If usedCodeElementFullName matches several code elements of different kinds (like some assemblies and some namespaces) a compilation resolving error is emitted.
To solve this issue, the string can be prefixed with "ASSEMBLY:", "NAMESPACE:", "TYPE:", "METHOD:", "FIELD:", "PROPERTY:" or "EVENT:" to precise the kind of code element to match.
Alternatively, the string extensions methods MatchAssembly, MatchNamespace, MatchType, MatchMethod, MatchField, MatchProperty or MatchEvent can be used instead, to insert this prefix.
If no code element is matched by usedCodeElementFullName, the CQLinq query will emit a compilation error, except if usedCodeElementFullName is prefixed with "OPTIONAL:".
Alternatively, the string extensions methods AllowNoMatch can be used instead, to insert the "OPTIONAL:" prefix.
Return Value
userCodeElement being a NDepend.CodeModel.ICodeElement whose NDepend.CodeModel.ICodeElement.FullName is usedCodeElementFullName:
Returns true if userCodeElement is, directly or indirectly, using a userCodeElement, otherwise returns false.
Returns true if userCodeElement is, directly or indirectly, using a userCodeElement, otherwise returns false.