DllHelper.cs 484 B

12345678910111213141516171819202122
  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. #if __MonoCS__
  13. byte[] pdbBytes = File.ReadAllBytes("./Hotfix.dll.mdb");
  14. #else
  15. byte[] pdbBytes = File.ReadAllBytes("./Hotfix.pdb");
  16. #endif
  17. Assembly assembly = Assembly.Load(dllBytes, pdbBytes);
  18. return assembly;
  19. }
  20. }
  21. }