Example #1
0
        public bool TryGetValueByCodeAndCategory(string code, string category, out FapDict fapDict)
        {
            if (!_initialized)
            {
                Init();
            }
            var result = _allDicts.FirstOrDefault(c => c.Category == category && c.Code == code);

            if (result != null)
            {
                fapDict = result;
                return(true);
            }
            fapDict = null;
            return(false);
        }
Example #2
0
        public bool TryGetValue(string fid, out FapDict fapDict)
        {
            if (!_initialized)
            {
                Init();
            }
            var result = _allDicts.FirstOrDefault <FapDict>(f => f.Fid == fid);

            if (result != null)
            {
                fapDict = result;
                return(true);
            }
            fapDict = null;
            return(false);
        }