Table of Contents

Class MergedNamespace

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

A merged namespace.

public sealed class MergedNamespace : INamespace, ISymbol, ICompilationProvider
Inheritance
MergedNamespace
Implements
Inherited Members

Constructors

MergedNamespace(ICompilation, INamespace[], string)

Creates a new merged root namespace.

public MergedNamespace(ICompilation compilation, INamespace[] namespaces, string externAlias = null)

Parameters

compilation ICompilation

The main compilation.

namespaces INamespace[]

The individual namespaces being merged.

externAlias string

The extern alias for this namespace.

MergedNamespace(INamespace, INamespace[])

Creates a new merged child namespace.

public MergedNamespace(INamespace parentNamespace, INamespace[] namespaces)

Parameters

parentNamespace INamespace

The parent merged namespace.

namespaces INamespace[]

The individual namespaces being merged.

Properties

ChildNamespaces

Gets the child namespaces in this namespace.

public IEnumerable<INamespace> ChildNamespaces { get; }

Property Value

IEnumerable<INamespace>

Compilation

Gets the parent compilation. This property never returns null.

public ICompilation Compilation { get; }

Property Value

ICompilation

ContributingModules

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

public IEnumerable<IModule> ContributingModules { get; }

Property Value

IEnumerable<IModule>

ExternAlias

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

public string ExternAlias { get; }

Property Value

string

FullName

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

public string FullName { get; }

Property Value

string

Name

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

public string Name { get; }

Property Value

string

ParentNamespace

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

public INamespace ParentNamespace { get; }

Property Value

INamespace

SymbolKind

This property returns an enum specifying which kind of symbol this is (which derived interfaces of ISymbol are implemented)

public SymbolKind SymbolKind { get; }

Property Value

SymbolKind

Types

Gets the types in this namespace.

public IEnumerable<ITypeDefinition> Types { get; }

Property Value

IEnumerable<ITypeDefinition>

Methods

GetChildNamespace(string)

public INamespace GetChildNamespace(string name)

Parameters

name string

Returns

INamespace

GetTypeDefinition(string, int)

public ITypeDefinition GetTypeDefinition(string name, int typeParameterCount)

Parameters

name string
typeParameterCount int

Returns

ITypeDefinition

ToString()

public override string ToString()

Returns

string