Exemple #1
0
 public override void EmitOutput(string file, AssemblyDefinition asm)
 {
     mHostEnvironment = new CCIEnvironment();
     mAssembly = new MCM.Assembly();
     mAssembly.Name = mHostEnvironment.NameTable.GetNameFor(Path.GetFileNameWithoutExtension(file));
     mAssembly.ModuleName = mHostEnvironment.NameTable.GetNameFor(Path.GetFileName(file));
     RunVisitors(asm);
     mAssembly.Kind = ModuleKind.DynamicallyLinkedLibrary;
     // todo: add pdb writing
     using (var xOut = new FileStream(file, FileMode.Create))
     {
         PeWriter.WritePeToStream(mAssembly, mHostEnvironment, xOut);
     }
 }
Exemple #2
0
 public EmitVisitorPhase2(MCM.Assembly assembly, CCIEnvironment hostEnvironment)
 {
     mAssembly = assembly;
     mHostEnvironment = hostEnvironment;
 }
Exemple #3
0
 public EmitVisitorPhase1(MCM.Assembly assembly, CCIEnvironment hostEnvironment)
 {
     mAssembly = assembly;
     mHostEnvironment = hostEnvironment;
     Types = new Dictionary<TypeReference, MCM.TypeDefinition>();
 }
Exemple #4
0
 public EmitVisitorPhase3(MCM.Assembly assembly, CCIEnvironment hostEnvironment)
 {
     mAssembly = assembly;
     mHostEnvironment = hostEnvironment;
     MethodsMap = new Dictionary<MethodDefinition, MCM.MethodDefinition>();
 }