public void LoadAssemblies() { if (!NeedsReload) { return; } foreach (var dll in properties.dllReferences) { LoadAssembly(EncapsulateReferences(modFile.GetFile("lib/" + dll + ".dll"))); } assembly = LoadAssembly(EncapsulateReferences(modFile.GetMainAssembly()), modFile.GetMainPDB()); NeedsReload = false; }
public void LoadAssemblies() { if (!NeedsReload) { return; } try { modFile.Read(TmodFile.LoadedState.Code); foreach (var dll in properties.dllReferences) { LoadAssembly(EncapsulateReferences(modFile.GetFile("lib/" + dll + ".dll"))); } assembly = LoadAssembly(EncapsulateReferences(modFile.GetMainAssembly()), modFile.GetMainPDB()); NeedsReload = false; } catch (Exception e) { e.Data["mod"] = Name; throw; } }
public void LoadAssemblies() { if (!NeedsReload) { return; } try { using (modFile.EnsureOpen()) { foreach (var dll in properties.dllReferences) { LoadAssembly(EncapsulateReferences(modFile.GetBytes("lib/" + dll + ".dll"))); } assembly = LoadAssembly(EncapsulateReferences(modFile.GetMainAssembly()), modFile.GetMainPDB()); NeedsReload = false; } } catch (Exception e) { e.Data["mod"] = Name; throw; } }