NDepend.API Documentation
ParentNamespace Property (INamespace)
NDepend.CodeModel Namespace > INamespace Interface : ParentNamespace Property
Gets the parent namespaces of this namespace. Gets null if no parent namespace is found. For example the parent namespace of the namespace AA.BB.CC could be AA.BB but not AA.
Syntax
INamespace ParentNamespace {get;}
Remarks
The anonymous namespace doesn't have any parent namespace.
If the namespace AA.BB doesn't contain any type, it is not shown as a parent namespace of AA.BB.CC. Indeed, if a namespace doesn't contain any type, the NDepend code model doesn't contain an associated INamespace object. In such case AA is deemed as being the direct parent namespace of AA.BB.CC.
This property getter has a O(this.ParentAssembly.ChildNamespaces.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

INamespace Interface
INamespace Members
ChildNamespaces Property
DirectChildNamespaces Property
ParentNamespaces Property