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); } }
public EmitVisitorPhase2(MCM.Assembly assembly, CCIEnvironment hostEnvironment) { mAssembly = assembly; mHostEnvironment = hostEnvironment; }
public EmitVisitorPhase1(MCM.Assembly assembly, CCIEnvironment hostEnvironment) { mAssembly = assembly; mHostEnvironment = hostEnvironment; Types = new Dictionary<TypeReference, MCM.TypeDefinition>(); }
public EmitVisitorPhase3(MCM.Assembly assembly, CCIEnvironment hostEnvironment) { mAssembly = assembly; mHostEnvironment = hostEnvironment; MethodsMap = new Dictionary<MethodDefinition, MCM.MethodDefinition>(); }