Changeset 13351 for branches/ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/ScopeUtil.cs
- Timestamp:
- 11/23/15 22:18:35 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/ScopeUtil.cs
r13337 r13351 46 46 } 47 47 48 public static ISolution GetSolution(IScope scope, IEncoding encoding) { 49 var name = encoding.Name; 50 if (!scope.Variables.ContainsKey(name)) throw new ArgumentException(string.Format(" {0} cannot be found in the provided scope.", name)); 51 var value = scope.Variables[name].Value as ISolution; 52 if (value == null) throw new InvalidOperationException(string.Format("Value of {0} is null.", name)); 53 return value; 54 } 55 48 56 } 49 57 }
Note: See TracChangeset
for help on using the changeset viewer.