Free cookie consent management tool by TermsFeed Policy Generator

Changeset 886


Ignore:
Timestamp:
12/02/08 19:42:00 (15 years ago)
Author:
kgrading
Message:

worked on #410

Location:
trunk/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r882 r886  
    8989      //clientCommunicator.LoginAsync(ConfigurationManager.GetInstance().GetClientInfo());
    9090
    91       Heartbeat beat = new Heartbeat { Interval = 5000 };
     91      Heartbeat beat = new Heartbeat { Interval = 30000 };
    9292      beat.StartHeartbeat();     
    9393
     
    154154      bool sandboxed = false;
    155155
    156       AppDomain appDomain =  PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.JobId.ToString(), sandboxed);
     156      PluginManager.Manager.Initialize();
     157      AppDomain appDomain =  PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.JobId.ToString(), sandboxed, typeof(TestJob));
    157158     
    158159      appDomains.Add(e.Result.JobId, appDomain);
  • trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs

    r882 r886  
    160160    }
    161161
    162     public AppDomain CreateAndInitAppDomainWithSandbox(string friendlyName, bool sandboxed) {
     162    public AppDomain CreateAndInitAppDomainWithSandbox(string friendlyName, bool sandboxed, Type jobType) {
    163163
    164164      PermissionSet pset;
     
    176176      Runner remoteRunner = (Runner)applicationDomain.CreateInstanceAndUnwrap(typeof(Runner).Assembly.GetName().Name, typeof(Runner).FullName);
    177177      NotifyListeners(PluginManagerAction.Initializing, "All plugins");
    178       if (remoteLoader != null) {
    179         remoteRunner.LoadPlugins(remoteLoader.ActivePlugins);
    180       } else if (LoadedPlugins != null && LoadedPlugins.Count > 0) {
    181         remoteRunner.LoadPlugins(LoadedPlugins);
     178
     179      DiscoveryService dService = new DiscoveryService();
     180      PluginInfo jobPlugin = dService.GetDeclaringPlugin(jobType);
     181
     182      List<PluginInfo> depPlugins = GetDependentPlugins(jobPlugin);
     183
     184      if (depPlugins != null && depPlugins.Count > 0) {
     185        remoteRunner.LoadPlugins(depPlugins);
    182186      }
    183187      NotifyListeners(PluginManagerAction.Initialized, "All plugins");
  • trunk/sources/HeuristicLab.PluginInfrastructure/Properties/AssemblyInfo.frame

    r581 r886  
    2424using System.Runtime.InteropServices;
    2525using HeuristicLab.PluginInfrastructure;
     26using System.Security;
    2627
    2728// General Information about an assembly is controlled through the following
     
    3637[assembly: AssemblyTrademark("")]
    3738[assembly: AssemblyCulture("")]
     39[assembly: AllowPartiallyTrustedCallers]
    3840
    3941// Setting ComVisible to false makes the types in this assembly not visible
  • trunk/sources/HeuristicLab.PluginInfrastructure/Runner.cs

    r29 r886  
    2424using System.Text;
    2525using System.Reflection;
     26using System.Security.Permissions;
     27using System.Security;
    2628
    2729namespace HeuristicLab.PluginInfrastructure {
     
    2931
    3032    public void LoadPlugins(ICollection<PluginInfo> plugins) {
     33      //FileIOPermission fileperm = new FileIOPermission(FileIOPermissionAccess.AllAccess, @"C:\Program Files\HeuristicLab 3.0\plugins\");
     34      //fileperm.Assert();
    3135      foreach(PluginInfo pluginInfo in plugins) {
    3236        foreach(string assemblyName in pluginInfo.Assemblies) {
     
    3438        }
    3539      }
     40      //CodeAccessPermission.RevertAssert();
    3641      PluginManager.Manager.LoadedPlugins = plugins;
    3742    }
Note: See TracChangeset for help on using the changeset viewer.