NDepend.API Documentation
Parents Property
NDepend.CodeModel Namespace > ICodeElement Interface : Parents Property
Returns a sequence of code element parent of this code element.
Syntax
Remarks
If this is a code base, the returned sequence is empty.
If this is an assembly, the returned sequence contains only the IAssembly.ParentCodeBase.
If this is a namespace, the returned sequence contains INamespace.INamespace.ParentAssembly and then INamespace.ParentCodeBase.
If this is a type, the returned sequence contains first IMember.IMember.ParentNamespace and IMember.IMember.ParentAssembly and then IMember.ParentCodeBase.
If this is a type nested in one or several other types, the returned sequence doesn't contain the parent type(s).
If this is a member (method or field), the returned sequence contains first IMember.IMember.ParentType and IMember.IMember.ParentNamespace and IMember.IMember.ParentAssembly and then IMember.ParentCodeBase.
Requirements

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

See Also

Reference

ICodeElement Interface
ICodeElement Members