Changeset 6538 for trunk/sources/HeuristicLab.PluginInfrastructure
- Timestamp:
- 07/07/11 15:10:33 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.PluginInfrastructure/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/SandboxApplicationManager.cs
r6174 r6538 132 132 } 133 133 134 /// <summary>135 /// Loads raw assemblies dynamically from a byte array136 /// </summary>137 /// <param name="assemblies">bytearray of all raw assemblies that should be loaded</param>138 internal void LoadAssemblies(IEnumerable<byte[]> assemblies) {139 foreach (byte[] asm in assemblies) {140 Assembly loadedAsm = Assembly.Load(asm);141 RegisterLoadedAssembly(loadedAsm);142 }143 }144 145 134 // register assembly in the assembly cache for the AssemblyResolveEvent 146 135 private void RegisterLoadedAssembly(Assembly asm) { -
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Sandboxing/SandboxManager.cs
r6487 r6538 25 25 using System.Security.Permissions; 26 26 using HeuristicLab.PluginInfrastructure.Manager; 27 using System.IO; 27 28 28 29 namespace HeuristicLab.PluginInfrastructure.Sandboxing { … … 69 70 //needed for HeuristicLab.Persistence, see DynamicMethod Constructor (String, Type, array<Type []()>[], Type, Boolean) 70 71 pSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlEvidence)); 71 72 ReflectionPermission refPerm = new ReflectionPermission(PermissionState.Unrestricted); 73 pSet.AddPermission(refPerm); 72 pSet.AddPermission(new ReflectionPermission(PermissionState.Unrestricted)); 74 73 75 74 FileIOPermission ioPerm = new FileIOPermission(PermissionState.None); 76 75 //allow path discovery for system drive, needed by HeuristicLab.Persistence: Serializer.BuildTypeCache() -> Assembly.CodeBase 77 ioPerm.AddPathList(FileIOPermissionAccess.PathDiscovery, Environment.SystemDirectory.Substring(0, 3));76 ioPerm.AddPathList(FileIOPermissionAccess.PathDiscovery, Path.GetPathRoot(Path.GetFullPath(Environment.SystemDirectory))); 78 77 //allow full access to the appdomain's base directory 79 78 ioPerm.AddPathList(FileIOPermissionAccess.AllAccess, applicationBase);
Note: See TracChangeset
for help on using the changeset viewer.