DllHelper.cs 396 B

123456789101112131415161718
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Reflection;
  5. namespace ETModel
  6. {
  7. public static class DllHelper
  8. {
  9. public static Assembly GetHotfixAssembly()
  10. {
  11. byte[] dllBytes = File.ReadAllBytes("./Hotfix.dll");
  12. byte[] pdbBytes = File.ReadAllBytes("./Hotfix.pdb");
  13. Assembly assembly = Assembly.Load(dllBytes, pdbBytes);
  14. return assembly;
  15. }
  16. }
  17. }