CodeQL library for C#
codeql/csharp-all 0.8.12 (changelog, source)
Search

Member predicate NamespaceDeclaration::getParentNamespaceDeclaration

Gets the parent namespace declaration, if any. In the following example, the namespace declaration namespace N2 on line 2 has parent namespace declaration namespace N1 on line 1, but namespace N1 on line 1 and namespace N1.N2 on line 7 do not have parent namespace declarations.

namespace N1 {
  namespace N2 {
    ...
  }
}

namespace N1.N2 {
  ...
}
NamespaceDeclaration getParentNamespaceDeclaration()