コード例 #1
0
 private static Assembly GetAssembly(string path)
 {
     foreach (var asm in AppDomain.CurrentDomain.GetAssemblies())
     {
         try {
             if (asm.Location == path)
             {
                 return(asm);
             }
         }
         catch (Exception) {
             // ignored
         }
     }
     return(ManagedApiLoader.LoadFile(path));
 }
コード例 #2
0
 public static Assembly LoadFile(string file)
 {
     using (var loader = new ManagedApiLoader(file)) {
         return(loader.Load());
     }
 }