/// <summary> /// Returns a property editor by alias /// </summary> /// <param name="alias"></param> /// <returns></returns> public IParameterEditor GetByAlias(string alias) { var found = ParameterEditors.SingleOrDefault(x => x.Alias == alias); if (found != null) { return(found); } //couldn't find one, so try the map var mapped = LegacyParameterEditorAliasConverter.GetNewAliasFromLegacyAlias(alias); return(mapped == null ? null : ParameterEditors.SingleOrDefault(x => x.Alias == mapped)); }
/// <summary> /// Returns a property editor by alias /// </summary> /// <param name="alias"></param> /// <param name="includeDeprecated"></param> /// <returns></returns> public IParameterEditor GetByAlias(string alias, bool includeDeprecated = false) { var paramEditors = GetParameterEditors(includeDeprecated).ToArray(); var found = paramEditors.SingleOrDefault(x => x.Alias == alias); if (found != null) { return(found); } //couldn't find one, so try the map var mapped = LegacyParameterEditorAliasConverter.GetNewAliasFromLegacyAlias(alias); return(mapped == null ? null : paramEditors.SingleOrDefault(x => x.Alias == mapped)); }