public void Create (AssemblyDefinition assembly, ModuleBuilder moduleBuilder) { this.assembly = assembly; builder = moduleBuilder; }
public void SetDeclaringAssembly (AssemblyDefinition assembly) { // TODO: This setter is quite ugly but I have not found a way around it yet this.assembly = assembly; }
public void LoadModules (AssemblyDefinition assembly) { if (RootContext.Modules.Count == 0) return; foreach (var module in RootContext.Modules) { LoadModule (assembly, module); } }
void LoadModule (AssemblyDefinition assembly, string module) { string total_log = ""; try { try { assembly.AddModule (module); } catch (FileNotFoundException) { bool err = true; foreach (string dir in paths) { string full_path = Path.Combine (dir, module); if (!module.EndsWith (".netmodule")) full_path += ".netmodule"; try { assembly.AddModule (full_path); err = false; break; } catch (FileNotFoundException ff) { total_log += ff.FusionLog; } } if (err) { Error6 (module, total_log); return; } } } catch (BadImageFormatException f) { Error9 ("module", f.FileName, f.FusionLog); } catch (FileLoadException f) { Error9 ("module", f.FileName, f.FusionLog); } }
public AssemblyDefinition MakeExecutable (string name, string fileName) { assembly = new AssemblyDefinition (this, name, fileName); return assembly; }
public void SetDeclaringAssembly(AssemblyDefinition assembly) { // TODO: This setter is quite ugly but I have not found a way around it yet this.assembly = assembly; }
public void Create(AssemblyDefinition assembly, ModuleBuilder moduleBuilder) { this.assembly = assembly; builder = moduleBuilder; }