Assemblies and ModulesNReflect

This pages gives on overview about the assembly and modules.

Overview

An assembly is a .dll or .exe file and contains the logic and the resources needed for a program to run (ok, most likely there are some other assemblies needed, but that's not important here).

An assembly consists of one or more modules. A module can contain types, fields and methods. There are no types outside a module, especially not directly at an assembly.

Since the most of the time you are only interested in the types of an assembly (and not the modules), NReflect gives you the opportunity to access all types of the assembly (regardless in which module they are placed) and the modules whith all contained types.

The types which are used by NReflect to deal with assemblies and modules are shown in figure 1.

Assembly Module
Figure 1: This class diagram shows all types belonging to assemblies and modules.
Types used by NReflect for assemblies and modules

Assembly

When reflecting an assembly using any Reflector.Reflect-Method, you will get an instance of NReflect.NRAssembly which is the root of the returned object tree.

Module

It is not possible to reflect the modules without reflecting an assembly. If you reflected an assembly, the modules are stored at the NRAssembly.Modules property.

Entity container

Since both assembly and module may contain entities, they are both implementing the interface NReflect.IEntityContainer.

See Also

Reference

Other Resources