Table of Contents

Interface IModule

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

Represents a metadata module.

public interface IModule : ISymbol, ICompilationProvider
Inherited Members
Extension Methods

Properties

AssemblyName

Gets the assembly name (short name).

string AssemblyName { get; }

Property Value

string

AssemblyVersion

Gets the assembly version.

Version AssemblyVersion { get; }

Property Value

Version

FullAssemblyName

Gets the full assembly name (including public key token etc.)

string FullAssemblyName { get; }

Property Value

string

IsMainModule

Gets whether this assembly is the main assembly of the compilation.

bool IsMainModule { get; }

Property Value

bool

PEFile

Gets the underlying metadata file. May return null, if the IAssembly was not created from a PE file.

PEFile? PEFile { get; }

Property Value

PEFile

RootNamespace

Gets the root namespace for this module.

INamespace RootNamespace { get; }

Property Value

INamespace

Remarks

This always is the namespace without a name - it's unrelated to the 'root namespace' project setting. It contains only subnamespaces and types defined in this module -- use ICompilation.RootNamespace to get the combined view of all referenced assemblies.

TopLevelTypeDefinitions

Gets all non-nested types in the assembly.

IEnumerable<ITypeDefinition> TopLevelTypeDefinitions { get; }

Property Value

IEnumerable<ITypeDefinition>

TypeDefinitions

Gets all types in the assembly, including nested types.

IEnumerable<ITypeDefinition> TypeDefinitions { get; }

Property Value

IEnumerable<ITypeDefinition>

Methods

GetAssemblyAttributes()

Gets the list of all assembly attributes in the project.

IEnumerable<IAttribute> GetAssemblyAttributes()

Returns

IEnumerable<IAttribute>

GetModuleAttributes()

Gets the list of all module attributes in the project.

IEnumerable<IAttribute> GetModuleAttributes()

Returns

IEnumerable<IAttribute>

GetTypeDefinition(TopLevelTypeName)

Gets the type definition for a top-level type.

ITypeDefinition? GetTypeDefinition(TopLevelTypeName topLevelTypeName)

Parameters

topLevelTypeName TopLevelTypeName

Returns

ITypeDefinition

Remarks

This method uses ordinal name comparison, not the compilation's name comparer.

InternalsVisibleTo(IModule)

Gets whether the internals of this assembly are visible in the specified assembly.

bool InternalsVisibleTo(IModule module)

Parameters

module IModule

Returns

bool