コード例 #1
0
 private int reassembleFile(IlAsm ilAsm, string outputFile, string ilSuffix, CpuPlatform cpu)
 {
     try {
         return(ilAsm.ReassembleFile(outputFile, ilSuffix, cpu));
     }
     finally {
         cleanup(ilAsm);
     }
 }
コード例 #2
0
 private void RunIlAsm(IlAsm ilAsm)
 {
     using (this.GetNotifier().CreateContextName((object)this, "RunIlAsm"))
     {
         if (this.InputValues.Cpu == CpuPlatform.AnyCpu)
         {
             string str      = Path.GetDirectoryName(this.InputValues.OutputFileName) ?? "";
             string fileName = Path.GetFileName(this.InputValues.OutputFileName);
             if (!Directory.Exists(str))
             {
                 throw new DirectoryNotFoundException(string.Format(Resources.Directory_0_does_not_exist, (object)str));
             }
             this.GetNotifier().Notify(1, DllExportLogginCodes.CreatingBinariesForEachPlatform, Resources.Platform_is_0_creating_binaries_for_each_CPU_platform_in_a_separate_subfolder, (object)this.InputValues.Cpu);
             ilAsm.ReassembleFile(Path.Combine(Path.Combine(str, "x86"), fileName), ".x86", CpuPlatform.X86);
             ilAsm.ReassembleFile(Path.Combine(Path.Combine(str, "x64"), fileName), ".x64", CpuPlatform.X64);
         }
         else
         {
             ilAsm.ReassembleFile(this.InputValues.OutputFileName, "", this.InputValues.Cpu);
         }
     }
 }