public DisassembledAssembly Disassemble(IncomingAssembly assembly, Configuration configuration) { ProcessRunner runner = new ProcessRunner(); Pathname ilPath = assembly.Path.ChangeDirectory(configuration.OutputDirectory).ChangeExtension("il"); runner.Run(configuration.IlDasmPath, "/NOBAR", assembly.Path.AsString, "/OUT:" + ilPath); return new DisassembledAssembly(ilPath, assembly.Type); }
public AssembledAssembly Assemble(DisassembledAssembly assembly, Configuration configuration) { ProcessRunner runner = new ProcessRunner(); Pathname binaryPath = assembly.Path.ChangeDirectory(configuration.OutputDirectory).ChangeExtension(assembly.Type.ToExtension()); runner.Run(configuration.IlAsmPath, assembly.Path.AsString, "/QUIET", "/DEBUG", assembly.Type.ToIlAsmArgument(), "/KEY:" + configuration.KeyFile.AsString); PublicKeyToken publicKeyToken = ReadAssemblyPublicKeyToken(binaryPath); return new AssembledAssembly(binaryPath, publicKeyToken); }