예제 #1
0
 public static void GenerateLibAsync(string origFile, Action <PatchException> callback)
 {
     new Thread(() => {
         PatchException exception = null;
         try
         {
             GenerateLib(origFile);
         }
         catch (PatchException e)
         {
             exception = e;
         }
         finally
         {
             callback(exception);
         }
     }).Start();
 }
예제 #2
0
 //TODO setup progress callback
 public static void PatchAsync(string origFile, string patchFile, Action <AssemblyDefinition, PatchException> callback)
 {
     new Thread(() => {
         PatchException exception  = null;
         AssemblyDefinition asmDef = null;
         try
         {
             Patch(origFile, patchFile, out asmDef);
         }catch (PatchException e)
         {
             exception = e;
         }
         finally
         {
             callback(asmDef, exception);
         }
     }).Start();
 }