Hi Kosta,
On Sun, Jan 30, 2011 at 5:32 PM, zertsekel <[email protected]> wrote:
> Hi all,
> In Cecil 0.6 (old version) multi-module assemblies were supported
> through:
>
> AssemblyDefinition assembly = AssemblyFactory.GetAssembly(file);
> foreach (ModuleDefinition module in assembly.Modules) {
> ...
> }
>
> But in Cecil 0.9 (the new one) the only API to access assembly is:
>
> ModuleDefinition module = ModuleDefinition.ReadModule(file);
>
> What happens with multi-module assemblies and should we care at all?
You can do:
AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly (file);
foreach (ModuleDefinition module in assembly.Modules) {
}
But indeed, you can read single modules with
ModuleDefinition.ReadModule, which wasn't possible in 0.6.
Jb
--
--
mono-cecil