- Timestamp:
- 09/16/19 23:48:36 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/HeuristicLab.Parameters-3.3.csproj
r16723 r17254 122 122 <None Include="Plugin.cs.frame" /> 123 123 <Compile Include="ConstrainedValueParameter.cs" /> 124 <Compile Include="ContextLookupParameter.cs" /> 124 125 <Compile Include="FixedValueParameter.cs" /> 125 126 <Compile Include="OptionalConstrainedValueParameter.cs" /> -
branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/LookupParameter.cs
r17226 r17254 22 22 using System; 23 23 using System.Threading; 24 using HEAL.Attic; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; 26 using HEAL.Attic;27 27 28 28 namespace HeuristicLab.Parameters { … … 136 136 while (currentExecutionContext != null) { 137 137 IParameter param = null; 138 while (currentExecutionContext != null && !currentExecutionContext.Parameters.TryGetValue(translatedName, out param)) 138 while (currentExecutionContext != null && (!currentExecutionContext.Parameters.TryGetValue(translatedName, out param) 139 || param is IContextLookupParameter)) 139 140 currentExecutionContext = currentExecutionContext.Parent; 140 141 if (currentExecutionContext == null) break; … … 143 144 lookupParam = param as ILookupParameter; 144 145 145 if ( (valueParam == null) && (lookupParam == null))146 if (valueParam == null && lookupParam == null) 146 147 throw new InvalidOperationException( 147 string.Format("Parameter look-up chain broken. Parameter \"{0}\" is n ot an \"{1}\"or an \"{2}\".",148 string.Format("Parameter look-up chain broken. Parameter \"{0}\" is neither an \"{1}\" nor an \"{2}\".", 148 149 translatedName, typeof(IValueParameter).GetPrettyName(), typeof(ILookupParameter).GetPrettyName()) 149 150 );
Note: See TracChangeset
for help on using the changeset viewer.