private static string GetDataValue(SearchField field, EasySearchDataItem <T> item) { switch (field) { case SearchField.Value: return(item.Item.Value); case SearchField.Name: return(item.Item.Name); case SearchField.Pinyin: return(item.Pinyin); } return(null); }
public override IDecoderItem Decode(string code, params object[] args) { if (string.IsNullOrEmpty(code)) { return(null); } EasySearchDataItem <T> result = fList[code]; if (result != null) { return(result.Item); } return(null); }