static TexHelper() { String folder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); String filePath = Path.Combine(folder, Environment.Is64BitProcess ? "x64" : "x86", "DirectXTexNetImpl.dll"); Assembly assembly = Assembly.LoadFile(filePath); Instance = (TexHelper)Activator.CreateInstance(assembly.GetType("DirectXTexNet.TexHelperImpl")); }
public static void LoadInstanceFrom(string filePath) { Instance = (TexHelper)Activator.CreateInstance(Assembly.LoadFile(filePath).GetType("DirectXTexNet.TexHelperImpl")); }