Table of Contents

Interface INamespace

Namespace
ICSharpCode.Decompiler.TypeSystem
Assembly
ICSharpCode.Decompiler.dll

Represents a resolved namespace.

public interface INamespace : ISymbol, ICompilationProvider
Inherited Members

Properties

ChildNamespaces

Gets the child namespaces in this namespace.

IEnumerable<INamespace> ChildNamespaces { get; }

Property Value

IEnumerable<INamespace>

ContributingModules

Gets the modules that contribute types to this namespace (or to child namespaces).

IEnumerable<IModule> ContributingModules { get; }

Property Value

IEnumerable<IModule>

ExternAlias

Gets the extern alias for this namespace. Returns an empty string for normal namespaces.

string ExternAlias { get; }

Property Value

string

FullName

Gets the full name of this namespace. (e.g. "System.Collections")

string FullName { get; }

Property Value

string

Name

Gets the short name of this namespace (e.g. "Collections").

string Name { get; }

Property Value

string

ParentNamespace

Gets the parent namespace. Returns null if this is the root namespace.

INamespace? ParentNamespace { get; }

Property Value

INamespace

Types

Gets the types in this namespace.

IEnumerable<ITypeDefinition> Types { get; }

Property Value

IEnumerable<ITypeDefinition>

Methods

GetChildNamespace(string)

Gets a direct child namespace by its short name. Returns null when the namespace cannot be found.

INamespace? GetChildNamespace(string name)

Parameters

name string

Returns

INamespace

Remarks

This method uses the compilation's current string comparer.

GetTypeDefinition(string, int)

Gets the type with the specified short name and type parameter count. Returns null if the type cannot be found.

ITypeDefinition? GetTypeDefinition(string name, int typeParameterCount)

Parameters

name string
typeParameterCount int

Returns

ITypeDefinition

Remarks

This method uses the compilation's current string comparer.