Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1499


Ignore:
Timestamp:
04/03/09 12:30:43 (16 years ago)
Author:
kgrading
Message:

added the recursive dependency resolvement and added the SequentialEngien Dependency to the Hive.Engine (#570)

Location:
trunk/sources
Files:
1 added
5 edited

Legend:

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

    r1487 r1499  
    4545using HeuristicLab.Hive.Client.Core.JobStorage;
    4646
    47 
    4847namespace HeuristicLab.Hive.Client.Core {
    4948  /// <summary>
     
    206205
    207206        PluginManager.Manager.Initialize();
    208         AppDomain appDomain = PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.Id.ToString(), sandboxed, typeof(TestJob));
     207       
     208        AppDomain appDomain = PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.Id.ToString(), sandboxed, typeof(HeuristicLab.Hive.Engine.HiveEngine));
    209209        appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException);
    210210        lock (engines) {                   
  • trunk/sources/HeuristicLab.Hive.Client.Core/HeuristicLab.Hive.Client.Core.csproj

    r1474 r1499  
    143143      <Name>HeuristicLab.Hive.Contracts</Name>
    144144    </ProjectReference>
     145    <ProjectReference Include="..\HeuristicLab.Hive.Engine\HeuristicLab.Hive.Engine.csproj">
     146      <Project>{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}</Project>
     147      <Name>HeuristicLab.Hive.Engine</Name>
     148    </ProjectReference>
    145149    <ProjectReference Include="..\HeuristicLab.Hive.JobBase\HeuristicLab.Hive.JobBase.csproj">
    146150      <Project>{21187322-52DD-4243-80A4-A85F0263E63B}</Project>
  • trunk/sources/HeuristicLab.Hive.Engine/HeuristicLab.Hive.Engine.csproj

    r1474 r1499  
    1313    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    1414    <FileAlignment>512</FileAlignment>
     15    <SignAssembly>true</SignAssembly>
     16    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
    1517  </PropertyGroup>
    1618  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     
    122124  </ItemGroup>
    123125  <ItemGroup>
     126    <None Include="HeuristicLab.snk" />
    124127    <None Include="Properties\AssemblyInfo.frame" />
    125128  </ItemGroup>
  • trunk/sources/HeuristicLab.Hive.Engine/HeuristicLabHiveEnginePlugin.cs

    r1448 r1499  
    3333  [Dependency(Dependency = "HeuristicLab.Core-3.2")]
    3434  [Dependency(Dependency = "HeuristicLab.Hive.JobBase-3.2")]
     35  [Dependency(Dependency = "HeuristicLab.SequentialEngine-3.2")]
    3536  public class HeuristicLabHiveEnginePlugin : PluginBase {
    3637  }
  • trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs

    r1470 r1499  
    241241    public List<PluginInfo> GetDependentPlugins(PluginInfo pluginInfo) {
    242242      List<PluginInfo> mergedList = new List<PluginInfo>();
    243       foreach (PluginInfo plugin in InstalledPlugins) {
    244         if (plugin.Dependencies.Contains(pluginInfo)) {
    245           if (!mergedList.Contains(plugin)) {
    246             mergedList.Add(plugin);
    247           }
    248           // for each of the dependent plugins add the list of transitively dependent plugins
    249           // make sure that only one entry for each plugin is added to the merged list
    250           GetDependentPlugins(plugin).ForEach(delegate(PluginInfo dependentPlugin) {
    251             if (!mergedList.Contains(dependentPlugin)) {
    252               mergedList.Add(dependentPlugin);
    253             }
    254           });
    255         }
     243      //Bugfix the hell out of this...
     244      //Bugfixed the hell out of this...
     245      foreach (PluginInfo info in pluginInfo.Dependencies) {
     246        if (!mergedList.Contains(info)) {
     247          mergedList.Add(info);
     248          AddDependenciesRecursive(info, mergedList);       
     249        }       
    256250      }
    257251      return mergedList;
     252    }
     253
     254    private void AddDependenciesRecursive(PluginInfo info, List<PluginInfo> mergedList) {
     255      //if we've already processed this element => STOP IT!
     256      if(!mergedList.Contains(info)) {
     257        mergedList.Add(info);
     258        return;
     259      }
     260      foreach (PluginInfo depinfo in info.Dependencies)
     261        AddDependenciesRecursive(depinfo, mergedList);       
    258262    }
    259263
Note: See TracChangeset for help on using the changeset viewer.