Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/06/10 23:34:36 (14 years ago)
Author:
swagner
Message:

Worked on refactoring of algorithm analysis and tracing (#999)

  • fixed naming issues in DataTableValuesCollector, ResultsCollector and VariableCreator
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Parameters/3.3/LookupParameter.cs

    r3555 r3687  
    4242          OnActualNameChanged();
    4343        }
     44      }
     45    }
     46    public string TranslatedName {
     47      get {
     48        string translatedName;
     49        GetValueParameterAndTranslateName(out translatedName);
     50        return translatedName;
    4451      }
    4552    }
     
    168175      OnToStringChanged();
    169176    }
    170 
    171     public static string TranslateName(string name, IExecutionContext context) {
    172       string currentName = name;
    173       IExecutionContext currentContext = context;
    174       IParameter param;
    175       ILookupParameter lookupParam;
    176 
    177       while (currentContext != null) {
    178         currentContext.Parameters.TryGetValue(currentName, out param);
    179         if (param != null) {
    180           lookupParam = param as ILookupParameter;
    181           if (lookupParam == null)
    182             throw new InvalidOperationException(
    183               string.Format("Parameter look-up chain broken. Parameter \"{0}\" is not an \"{1}\".",
    184                             currentName,
    185                             typeof(ILookupParameter).GetPrettyName())
    186             );
    187           currentName = lookupParam.ActualName;
    188         }
    189         currentContext = currentContext.Parent;
    190       }
    191       return currentName;
    192     }
    193177  }
    194178}
Note: See TracChangeset for help on using the changeset viewer.