示例#1
0
        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);
        }
示例#2
0
        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);
        }