Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Code / INamespace

Interface INamespace

Represents a namespace inside the current compilation or an external assembly, according to the DeclaringAssembly property.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
public interface INamespace : INamedDeclaration, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable
Remarks

At design time, namespaces of the current compilation can be partial, or incomplete. See IsPartial for details.

Properties

Name Description
FullName

Gets the full name of the namespace, or an empty string if this is the global namespace.

IsGlobalNamespace

Gets a value indicating whether the current namespace represents the global (or root) namespace.

IsPartial

Gets a value indicating whether the current namespace is partial, i.e. incomplete. Metalama uses partial compilations at design time, when only the closure of modified types are being incrementally recompiled. In this scenario, namespaces of the current compilation are partial. Namespaces of external assemblies are never partial.

Namespaces

Gets the list of children namespaces of the current namespace the DeclaringAssembly. In case of partial compilations (see IsPartial), this collection only contain the namespaces in the current partial compilation.

ParentNamespace

Gets the parent namespace, or null if IsGlobalNamespace is true.

Types

Gets the list of types defined in the current namespace inside the DeclaringAssembly, but not in descendant namespaces. In case of partial compilations (see IsPartial), this collection only contain the types in the current partial compilation.

Methods

Name Description
GetDescendant(String)

Gets a descendant of the current namespace.

Extension Methods

NamespaceExtensions.IsAncestorOf(INamespace, INamespace)
NamespaceExtensions.IsDescendantOf(INamespace, INamespace)
NamespaceExtensions.Descendants(INamespace)
NamespaceExtensions.DescendantsAndSelf(INamespace)