Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/08/08 22:54:02 (14 years ago)
Author:
gkronber
Message:

created a branch for changes needed to run HL3 on Mono 2.0
(ticket #298)

Location:
branches/HL-3.2-MonoMigration
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/HL-3.2-MonoMigration/HeuristicLab.PluginInfrastructure/Runner.cs

    r29 r638  
    2424using System.Text;
    2525using System.Reflection;
     26using System.Runtime.Remoting;
     27using System.Runtime.Serialization;
    2628
    2729namespace HeuristicLab.PluginInfrastructure {
     
    2931
    3032    public void LoadPlugins(ICollection<PluginInfo> plugins) {
     33      List<string> loadedNames = new List<string>();
    3134      foreach(PluginInfo pluginInfo in plugins) {
    3235        foreach(string assemblyName in pluginInfo.Assemblies) {
    33           Assembly.LoadFrom(assemblyName);
     36          if(!loadedNames.Contains(assemblyName)) {
     37            Console.WriteLine("Loading assembly " + assemblyName);
     38            loadedNames.Add(assemblyName);
     39            Assembly.LoadFrom(assemblyName);
     40          }
    3441        }
    3542      }
     43      Console.WriteLine(AppDomain.CurrentDomain.Id);
    3644      PluginManager.Manager.LoadedPlugins = plugins;
    3745    }
    3846
    39     public void Run(ApplicationInfo appInfo) {
    40       IApplication runnablePlugin = (IApplication)Activator.CreateInstance(appInfo.PluginAssembly, appInfo.PluginType).Unwrap();
    41       runnablePlugin.Run();
     47    public void Run(string assembly, string type) {
     48      Console.WriteLine(AppDomain.CurrentDomain.Id);
     49      object proxy = AppDomain.CurrentDomain.CreateInstanceAndUnwrap(assembly, type);
    4250    }
    4351
Note: See TracChangeset for help on using the changeset viewer.