private GetEntry ( this section, [ key, IList |
||
section | this | |
key | [ | |
entries | IList |
|
defaultValueId | int | |
return |
public static SettingEntry GetEntry(this IniFileSection section, [LocalizationRequired(false)] string key, IList<SettingEntry> entries,
int defaultValueId) {
var value = section.GetNonEmpty(key);
return entries.FirstOrDefault(x => x.Value == value) ?? entries.FirstOrDefault(x => x.IntValue == defaultValueId) ?? entries.First();
}