Table of Contents

Interface ICompilation

Namespace
ICSharpCode.Decompiler.TypeSystem
Assembly
ICSharpCode.Decompiler.dll
public interface ICompilation
Extension Methods

Properties

CacheManager

CacheManager CacheManager { get; }

Property Value

CacheManager

MainModule

Gets the primary module. This is the module being (de)compiled; all other modules in the compilation are the other assemblies/modules referenced by the main module.

IModule MainModule { get; }

Property Value

IModule

Modules

Gets the list of all modules in the compilation.

IReadOnlyList<IModule> Modules { get; }

Property Value

IReadOnlyList<IModule>

Remarks

This main module is the first entry in the list.

NameComparer

Gets the name comparer for the language being compiled. This is the string comparer used for the INamespace.GetTypeDefinition method.

StringComparer NameComparer { get; }

Property Value

StringComparer

ReferencedModules

Gets the referenced modules. This list does not include the main module.

IReadOnlyList<IModule> ReferencedModules { get; }

Property Value

IReadOnlyList<IModule>

RootNamespace

Gets the root namespace of this compilation. This is a merged version of the root namespaces of all assemblies.

INamespace RootNamespace { get; }

Property Value

INamespace

Remarks

This always is the namespace without a name - it's unrelated to the 'root namespace' project setting.

Methods

FindType(KnownTypeCode)

IType FindType(KnownTypeCode typeCode)

Parameters

typeCode KnownTypeCode

Returns

IType

GetNamespaceForExternAlias(string?)

Gets the root namespace for a given extern alias.

INamespace? GetNamespaceForExternAlias(string? alias)

Parameters

alias string

Returns

INamespace

Remarks

If alias is null or an empty string, this method returns the global root namespace. If no alias with the specified name exists, this method returns null.