Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/29/14 13:27:07 (8 years ago)
Author:
abeham
Message:

#2174: cleaned up API a little

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/ProblemDefinitionScript.cs

    r11397 r11402  
    8383      var types = assembly.GetTypes();
    8484      try {
    85         Instance = (IProblemDefinition)Activator.CreateInstance(types.First(x => typeof(IProblemDefinition).IsAssignableFrom(x)));
    86         Instance.vars = new Variables(VariableStore);
    87         Instance.Initialize();
     85        var inst = (ProblemDefinition)Activator.CreateInstance(types.First(x => typeof(ProblemDefinition).IsAssignableFrom(x)));
     86        inst.vars = new Variables(VariableStore);
     87        inst.Initialize();
     88        Instance = inst;
    8889      } catch {
    8990        Instance = null;
Note: See TracChangeset for help on using the changeset viewer.